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

Conversation

@lytefast
Copy link
Contributor

@lytefast lytefast commented Feb 10, 2017

This change should prevent hard crashes when we can't load cameraview.

Before: app crashes if these exception occur
This occurred while I was testing out cameraview and then created an intent to load the camera. When the intent came back and onResume() was called (which then called cameraview.start() the sample app would hard crash.

This prevents a hard crash but still leaves the cameraview in a broken state.

Was tested using https://github.com/lytefast/flex-input + Google Pixel Phone:
0) disable the google pixel from the blacklist in CameraFragment#isBlacklistedDevice()

  1. load app
  2. hit (+) button
  3. go to camera
  4. hit the right button to open the camera app
  5. capture picture

Result: app hard crashes
With change: picture is captured, cameraview is broken, but the app is still running correctly.

Before: app crashes if these exception occur
@lytefast
Copy link
Contributor Author

lytefast commented Feb 10, 2017

#102 is a better solution.

@lytefast lytefast closed this Feb 10, 2017
@lytefast lytefast deleted the prevent-hard-crash branch February 10, 2017 04:03
@lytefast lytefast restored the prevent-hard-crash branch February 10, 2017 04:06
@lytefast
Copy link
Contributor Author

lytefast commented Feb 10, 2017

Mistook #102 as solving this issue. But it address another issue.

@lytefast lytefast reopened this Feb 10, 2017
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.

2 participants