Signal-Android
Signal-Android copied to clipboard
Fixes #13299: Enable the camera only if permission is granted
First time contributor checklist
- [x] I have read how to contribute to this project
- [x] I have signed the Contributor License Agreement
Contributor checklist
- [x] I am following the Code Style Guidelines
- [x] I have tested my contribution on these devices:
- Redmi Note 10 Pro, Android 13, MUI 14
- [x] My contribution is fully baked and ready to be merged as is
- [x] I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the
Fixes #1234
syntax
Issue
Fixes: https://github.com/signalapp/Signal-Android/issues/13299
Before fix
Test case 1: ✅
- Settings
- Profile image
- Edit photo
- Camera -> Allow permission
- Back
- Photo -> Allow permission
Result: The Camera button is visible on the photo picker screen.
Test case 2: ❌
- Settings
- Profile Image
- Edit photo
- Photo -> Allow permission
Result: The Camera button is visible(❌) on the photo picker screen. Expected: The camera button should not be visible if the app doesn't have camera permission.
After fix
Test case 1: ✅
- Settings
- Profile image
- Edit photo
- Camera -> Allow permission
- Back
- Photo -> Allow permission
Result: The Camera button is visible on the photo picker screen.
Test case 2: ✅
- Settings
- Profile Image
- Edit photo
- Photo -> Allow permission
Result: The Camera button is not visible on the photo picker screen.
Both cases were tested several times with a clean app state.
Tested
Device | Android Version | Signal Version |
---|---|---|
Redmi Note 10 Pro | 6.41.3 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I don't think we should be hiding the camera button, we should simply request the permission if the button is clicked, or direct the user to enable the permission in settings if they've permanently denied it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
We recently did an overhaul of the camera permission flow, which I believe supercedes this.