Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camera:basic: fail if permissions are not granted #1047

Merged
merged 1 commit into from
May 14, 2024

Conversation

DanAlbert
Copy link
Member

Pre-work for #1031. For some reason the UI for the storage permission isn't shown whenever targetSdkVersion is 33+, and it's just returning a denial. This sample is badly structured such that if either permission isn't granted, the UI init will never run. The two permissions requests really ought to be decoupled (the viewfinder should still work even if I never try to save a photo), and the UI should tell the user why it failed. For now I'm just making it fail more violently, because the lack of any error or logging is what made this a multi-hour debugging experience instead of the now obvious problem.

Pre-work for android#1031. For
some reason the UI for the storage permission isn't shown whenever
targetSdkVersion is 33+, and it's just returning a denial. This sample
is badly structured such that if either permission isn't granted, the UI
init will never run. The two permissions requests really ought to be
decoupled (the viewfinder should still work even if I never try to save
a photo), and the UI should tell the user why it failed. For now I'm
just making it fail more violently, because the lack of any error or
logging is what made this a multi-hour debugging experience instead of
the now obvious problem.
@DanAlbert DanAlbert force-pushed the fix-blank-camera-screen branch from 552642b to 67270b8 Compare May 14, 2024 17:01
@DanAlbert DanAlbert merged commit c2fa4af into android:main May 14, 2024
2 checks passed
@DanAlbert DanAlbert deleted the fix-blank-camera-screen branch May 14, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants