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_USE_QUOTA = IInstalld.FLAG_USE_QUOTA;
|
||||||
public static final int FLAG_FORCE = IInstalld.FLAG_FORCE;
|
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 final boolean mIsolated;
|
||||||
|
|
||||||
private volatile IInstalld mInstalld;
|
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
|
// No apps are running this early, so no need to freeze
|
||||||
clearAppDataLIF(ps.pkg, UserHandle.USER_ALL,
|
clearAppDataLIF(ps.pkg, UserHandle.USER_ALL,
|
||||||
FLAG_STORAGE_DE | FLAG_STORAGE_CE | FLAG_STORAGE_EXTERNAL
|
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;
|
ver.fingerprint = Build.FINGERPRINT;
|
||||||
@@ -10222,8 +10223,10 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
clearAppDataLeafLIF(pkg.childPackages.get(i), userId, flags);
|
clearAppDataLeafLIF(pkg.childPackages.get(i), userId, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((flags & Installer.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES) == 0) {
|
||||||
clearAppProfilesLIF(pkg, UserHandle.USER_ALL);
|
clearAppProfilesLIF(pkg, UserHandle.USER_ALL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void clearAppDataLeafLIF(PackageParser.Package pkg, int userId, int flags) {
|
private void clearAppDataLeafLIF(PackageParser.Package pkg, int userId, int flags) {
|
||||||
final PackageSetting ps;
|
final PackageSetting ps;
|
||||||
@@ -22047,7 +22050,8 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
|
|
||||||
if (!Build.FINGERPRINT.equals(ver.fingerprint)) {
|
if (!Build.FINGERPRINT.equals(ver.fingerprint)) {
|
||||||
clearAppDataLIF(ps.pkg, UserHandle.USER_ALL, FLAG_STORAGE_DE | FLAG_STORAGE_CE
|
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