Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Fixes #13299: Enable the camera only if permission is granted

Open dautovicharis opened this issue 1 year ago • 2 comments

First time contributor checklist

Contributor checklist

  • 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 Screenshot 2023-12-08 at 15 44 34 6.41.3

dautovicharis avatar Dec 06 '23 00:12 dautovicharis

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.

stale[bot] avatar Apr 13 '24 06:04 stale[bot]

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.

alex-signal avatar Apr 15 '24 12:04 alex-signal

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.

stale[bot] avatar Jun 15 '24 11:06 stale[bot]

We recently did an overhaul of the camera permission flow, which I believe supercedes this.

greyson-signal avatar Jun 17 '24 13:06 greyson-signal