Do not clean up ART profiles during OTAs
Test: manual, upgrade & test for profiles Bug: 135299330 Change-Id: I39d3376fc845ec5f2b474ea6f39a3c534ed2ce69
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;
|
||||
|
||||
@@ -3240,7 +3240,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;
|
||||
@@ -10320,7 +10321,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) {
|
||||
@@ -22541,7 +22544,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