Skip to content

Commit f27f2f8

Browse files
krutonAndroid (Google) Code Review
authored andcommitted
Merge "Delete old forward-locked apps on upgrade" into jb-dev
2 parents 4d94ecb + 84e35ea commit f27f2f8

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

services/java/com/android/server/pm/PackageManagerService.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6140,7 +6140,22 @@ private InstallArgs createInstallArgs(InstallParams params) {
61406140

61416141
private InstallArgs createInstallArgs(int flags, String fullCodePath, String fullResourcePath,
61426142
String nativeLibraryPath) {
6143-
if (installOnSd(flags) || installForwardLocked(flags)) {
6143+
final boolean isInAsec;
6144+
if (installOnSd(flags)) {
6145+
/* Apps on SD card are always in ASEC containers. */
6146+
isInAsec = true;
6147+
} else if (installForwardLocked(flags)
6148+
&& !fullCodePath.startsWith(mDrmAppPrivateInstallDir.getAbsolutePath())) {
6149+
/*
6150+
* Forward-locked apps are only in ASEC containers if they're the
6151+
* new style
6152+
*/
6153+
isInAsec = true;
6154+
} else {
6155+
isInAsec = false;
6156+
}
6157+
6158+
if (isInAsec) {
61446159
return new AsecInstallArgs(fullCodePath, fullResourcePath, nativeLibraryPath,
61456160
installOnSd(flags), installForwardLocked(flags));
61466161
} else {

0 commit comments

Comments
 (0)