Merge "Do not clean up ART profiles during OTAs"
This commit is contained in:
@@ -85,6 +85,9 @@ public class Installer extends SystemService {
|
||||
public static final int FLAG_USE_QUOTA = IInstalld.FLAG_USE_QUOTA;
|
||||
public static final int FLAG_FORCE = IInstalld.FLAG_FORCE;
|
||||
|
||||
public static final int FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES =
|
||||
IInstalld.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES;
|
||||
|
||||
private final boolean mIsolated;
|
||||
|
||||
private volatile IInstalld mInstalld;
|
||||
|
||||
@@ -3136,7 +3136,8 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
// No apps are running this early, so no need to freeze
|
||||
clearAppDataLIF(ps.pkg, UserHandle.USER_ALL,
|
||||
FLAG_STORAGE_DE | FLAG_STORAGE_CE | FLAG_STORAGE_EXTERNAL
|
||||
| Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
|
||||
| Installer.FLAG_CLEAR_CODE_CACHE_ONLY
|
||||
| Installer.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES);
|
||||
}
|
||||
}
|
||||
ver.fingerprint = Build.FINGERPRINT;
|
||||
@@ -10222,7 +10223,9 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
clearAppDataLeafLIF(pkg.childPackages.get(i), userId, flags);
|
||||
}
|
||||
|
||||
clearAppProfilesLIF(pkg, UserHandle.USER_ALL);
|
||||
if ((flags & Installer.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES) == 0) {
|
||||
clearAppProfilesLIF(pkg, UserHandle.USER_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearAppDataLeafLIF(PackageParser.Package pkg, int userId, int flags) {
|
||||
@@ -22047,7 +22050,8 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
|
||||
if (!Build.FINGERPRINT.equals(ver.fingerprint)) {
|
||||
clearAppDataLIF(ps.pkg, UserHandle.USER_ALL, FLAG_STORAGE_DE | FLAG_STORAGE_CE
|
||||
| FLAG_STORAGE_EXTERNAL | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
|
||||
| FLAG_STORAGE_EXTERNAL | Installer.FLAG_CLEAR_CODE_CACHE_ONLY
|
||||
| Installer.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user