Recovers on boot when scan of data app fails
Prior to this change, system apps that had updated versions installed that could not be scanned on boot, did not have a fallback mechanism to restore the system app. With this change, we prepare for such a scenario and restore the system app using the existing "expecting better" mechanism. Test: manual; muck with an APK in /data/app and reboot. Bug: 117471712 Change-Id: Ic50880cc04e92003c2a20869cf38835af7ce3ccb
This commit is contained in:
@@ -2684,6 +2684,11 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
if (disabledPs.codePath == null || !disabledPs.codePath.exists()
|
||||
|| disabledPs.pkg == null) {
|
||||
possiblyDeletedUpdatedSystemApps.add(ps.name);
|
||||
} else {
|
||||
// We're expecting that the system app should remain disabled, but add
|
||||
// it to expecting better to recover in case the data version cannot
|
||||
// be scanned.
|
||||
mExpectingBetter.put(disabledPs.name, disabledPs.codePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user