-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
camera:basic: fail if permissions are not granted
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.
- Loading branch information
Showing
2 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters