Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Expose a callback when no cameras are detected. - #102

Open
mkotyk wants to merge 2 commits into
google:masterfrom
Trov:trov_no_camera_present
Open

Expose a callback when no cameras are detected.#102
mkotyk wants to merge 2 commits into
google:masterfrom
Trov:trov_no_camera_present

Conversation

@mkotyk

@mkotyk mkotyk commented Feb 9, 2017

Copy link
Copy Markdown
Contributor

Instead of throwing a Runtime exception, this patch exposes a callback to indicate there were no cameras enumerated. Tested using emulator.

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@mkotyk

mkotyk commented Feb 17, 2017

Copy link
Copy Markdown
Contributor Author

Trov signed it!

@phileo

phileo commented Apr 12, 2017

Copy link
Copy Markdown

Looks good, the only addition I would make is to call mCallback.onCameraNotAvailable() instead of barfing when the exception is thrown in Camera2.startOpeningCamera()

mkotyk added 2 commits June 9, 2017 09:23
- Fix crashes related to no camera (tested in emulator)
@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Jun 9, 2017
WayLoCode pushed a commit to WayLoCode/cameraview that referenced this pull request Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants