summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author yutingfang <yutingfang@google.com> 2024-10-11 18:53:37 -0700
committer Yuting Fang <yutingfang@google.com> 2024-11-04 19:23:23 +0000
commit85fa087dab8d1a7e4d3f3fc97865f01e30af07fd (patch)
treec440951cba69f377f7d84b1ac4b79fe2c88fc306 /libs/input/PointerController.cpp
parent703e95597555837e1b819f6ba0687a5ec8d74470 (diff)
Cache AppOp mode to reduce binder calls to the system server
This CL contains following changes to cache AppOp mode value in AppOpsManager: 1) Create a new IpcDataCache in AppOpsManager to cache op mode by uid, packageName, opCode, virtualDeviceId and attributionTag. 2) Unify mode checking logic between checkOp and noteOp in the system service in getAppOpModeRaw. The changes include: * checkOperation used to return default mode if uidState is null or package doesn't belong to the uid. Now it returns MODE_IGNORED. * isOpRestrictedDueToSuspend used to only apply to checkOperation, now it applies to noteOperation as well. * When checking if a package can bypass user's restriction on an op, we didn't account for the attributionTag for checkOperation, now we will. 3) Skip two location app ops for caching due to they are affected by attributionTag change described in #2 4) Invalidate cache when op mode value changes, op restriction changes. 5) Use cache only in various checkOp APIs for now. noteOp API change will come later. Skip cache for in-process binder calls Flag: android.permission.flags.appop_mode_caching_enabled Bug: 366013082 Test: presubmit Change-Id: Ifba35afa6ed7fe1f3d2fd583015179364e70b883
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions