Update mPermissionUpgradeNeeded in updateRuntimePermissionsFingerprint
PermissionPolicyService. grantOrUpgradeDefaultRuntimePermissionsIfNeeded(userId) method's IfNeeded part was not working and the code inside "if" could not be skipped due to PackageManagerService.isPermissionUpgradeNeeded(userId) returning true even for consecutive calls. The reason for that is Settings.updateRuntimePermissionsFingerprint(userId) method was not updating mPermissionUpgradeNeeded. This was causing consecutive user switches to do an unnecessary ~250ms work. Which should only be done for the first time the user is started. This CL fixed that issue by updating mPermissionUpgradeNeeded in Settings.updateRuntimePermissionsFingerprint(userId) method. Bug: 246988821 Test: Manual performance measurement via Perfetto Change-Id: I2edde089e497d9ffd18b498da88e26b3638ca2ba
Loading
Please register or sign in to comment