Skip to content

Conversation

@daniloercoli
Copy link
Contributor

@daniloercoli daniloercoli commented Jun 6, 2019

Fixes #10002 by making sure to not request permissions once again in the callback of permissions result.

Test no.1

  • Go to System settings -> Apps -> WP app -> Authorizations -> and disable permissions for the WP app
  • Open the WP app and go to block editor
  • Add a Image block and tap to add a picture
  • Select Take a picture
  • The system permissions dialog should show on the screen
  • Select "Never ask again " and tap on Deny
  • The app should not crash
  • Tap again on the "Add image" label within the block, and select Take a picture
  • The app should show a dialog and gives instructions to open settings

Test no.2

  • Enable Media and Storage permissions in system settings
  • Start the app and go to block editor
  • Add an image block and try to take a picture
  • Everything should work as expected

Test no.3

  • Disable permissions for the WP app (Media and Storage)
  • Start the app and go to block editor
  • Add an image block and take a picture
  • When asked give the permissions to the WP app
  • Everything should work as expected

Update release notes:

  • [ x ] If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

Copy link
Contributor

@mkevins mkevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this using all the scenarios in the description on develop and reproduced the problem. I also tested with these changes, and this PR fixes the problem. 🎉

It may be worth exploring if checkAndRequestCameraAndStoragePermissions is called from other code paths in a way that could lead to the same loop, but not a blocker here.

@daniloercoli daniloercoli merged commit 3aaaf5a into develop Jun 7, 2019
@daniloercoli daniloercoli deleted the fix/10002-Permissions-Denied-dialog-loop-and-crash branch June 7, 2019 13:48
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.

[GB-mobile] Permissions Denied dialog loop and crash

3 participants