Read permission state before scanning packages.
The readLegacyPermissionStateTEMP() call was originally introduced right before the old updateAllPermissions() call in ag/12329540 probably because we wanted to make sure packages have been properly scanned and reconciled before permission code tries to read permission state in combination with the existing package settings. But in the case of OTA removing a system app, it is possible for the permission state to change during the package reconciliation so the permission state should indeed be read earlier. It should actually be fine to read the permission state earlier as well because in Settings.RuntimePermissionPersistence.readStateForUserSyncLPr() (part of Settings.readLPw()), we are also consulting the not-yet-reconciled package settings and that has been fine for a long time. Fixes: 196177583 Test: presubmit Change-Id: I01dae1da934f927ca87b62773b6673a9b3aefb8a
Loading
Please register or sign in to comment