Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix blink screen on start app if one of the permissions was rejected and "Never ask again" button was pressed.
Problem:
If one of the permissions (READ_CONTACTS or WRITE_EXTERNAL_STORAGE) was rejected by the user and user pressed the button "Never ask again", then after that, screen start to blink after start application.
Сause:
It happens because one of the functions shouldShowRequestPermissionRationale in onResume methode in ui/DialogsActivity.java returns false and else statement call askForPermissons() function where all permissions put in one List and immediately requesting. Android trying to request blocked permission (blocked by the user with "never ask again" button), and this cause screen blink.
Solution:
Request permissions only if this permission not granted and not "Never ask again" button pressed.
I wrote small helper class with static functions. Sorry, i dont know in which one of the packages I can placed it.
This class created for using your requests with other you permissions.
Thanks for your work.