Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ab77461 authored by mrulhania's avatar mrulhania Committed by Manjeet Rulhania
Browse files

Optimize permission request flow for un-requestable/granted permission

When a permission is denied twice by the user or fixed by the
policy, Activity#requestPermission wouldn't show permission
dialog to the user.

We seen in the metrics that apps are requesting permanently
denied permissions very often, these requests can be
optimized by checking whether the permission dialog
will be shown to the user or not i.e. if a permission is
already granted or un-requestable, we can short circuit it.

This will help prevent app's activity pause/resume lifecycle
events, and improve performance for such requests.

Bug: 378923900
Bug: 366088122
Test: presubmit
FLAG: android.permission.flags.permission_request_short_circuit_enabled
Change-Id: Ifcb37a03990138b7c7d86c9d6e7a2292f6760795
parent f06d0c5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment