diff options
Diffstat (limited to 'core/java/android/content/pm/PackageParser.java')
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 763a017..40f4e8f 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -3159,6 +3159,9 @@ public class PackageParser { R.styleable.AndroidManifestActivity_screenOrientation, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); } + + a.info.lockTaskLaunchMode = + sa.getInt(R.styleable.AndroidManifestActivity_lockTaskMode, 0); } else { a.info.launchMode = ActivityInfo.LAUNCH_MULTIPLE; a.info.configChanges = 0; @@ -4655,7 +4658,7 @@ public class PackageParser { private static boolean copyNeeded(int flags, Package p, PackageUserState state, Bundle metaData, int userId) { - if (userId != 0) { + if (userId != UserHandle.USER_OWNER) { // We always need to copy for other users, since we need // to fix up the uid. return true; @@ -4737,11 +4740,9 @@ public class PackageParser { // Make shallow copy so we can store the metadata/libraries safely ApplicationInfo ai = new ApplicationInfo(p.applicationInfo); - if (userId != 0) { - ai.uid = UserHandle.getUid(userId, ai.uid); - ai.dataDir = PackageManager.getDataDirForUser(ai.volumeUuid, ai.packageName, userId) - .getAbsolutePath(); - } + ai.uid = UserHandle.getUid(userId, ai.uid); + ai.dataDir = PackageManager.getDataDirForUser(ai.volumeUuid, ai.packageName, userId) + .getAbsolutePath(); if ((flags & PackageManager.GET_META_DATA) != 0) { ai.metaData = p.mAppMetaData; } @@ -4766,11 +4767,9 @@ public class PackageParser { // This is only used to return the ResolverActivity; we will just always // make a copy. ai = new ApplicationInfo(ai); - if (userId != 0) { - ai.uid = UserHandle.getUid(userId, ai.uid); - ai.dataDir = PackageManager.getDataDirForUser(ai.volumeUuid, ai.packageName, userId) - .getAbsolutePath(); - } + ai.uid = UserHandle.getUid(userId, ai.uid); + ai.dataDir = PackageManager.getDataDirForUser(ai.volumeUuid, ai.packageName, userId) + .getAbsolutePath(); if (state.stopped) { ai.flags |= ApplicationInfo.FLAG_STOPPED; } else { |