summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author mrulhania <mrulhania@google.com> 2024-11-18 09:37:47 -0800
committer Manjeet Rulhania <mrulhania@google.com> 2024-12-12 07:38:38 -0800
commit7ab77461dd094e5bebf7e59833e662ab078016bf (patch)
tree7211748de4ac5c2732ae2323fe7e16f4cb640566 /libs/androidfw/misc.cpp
parentf06d0c5a3b9359aef795aa2a3602d7d053ed40bc (diff)
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
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions