diff options
| author | Amith Yamasani <yamasani@google.com> | 2013-05-01 21:28:18 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-01 21:28:18 -0700 |
| commit | 821b58a93df5edcdaaad49582b4a6726770214cd (patch) | |
| tree | cda239da243f067d9968533488d209ffd0d860b7 /core/java/android | |
| parent | 9cbe2ae3aeb9a73c866bfd96b34f2d8ce895ab6b (diff) | |
| parent | f5a553a4278a68fda9795dea759840d4f93546d7 (diff) | |
| download | frameworks_base-821b58a93df5edcdaaad49582b4a6726770214cd.zip frameworks_base-821b58a93df5edcdaaad49582b4a6726770214cd.tar.gz frameworks_base-821b58a93df5edcdaaad49582b4a6726770214cd.tar.bz2 | |
am f5a553a4: am 55a08c5a: Merge "Allow requiredForAllUsers to work on updates to system apps" into jb-mr2-dev
* commit 'f5a553a4278a68fda9795dea759840d4f93546d7':
Allow requiredForAllUsers to work on updates to system apps
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/RestrictionEntry.java | 3 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 16 |
2 files changed, 13 insertions, 6 deletions
diff --git a/core/java/android/content/RestrictionEntry.java b/core/java/android/content/RestrictionEntry.java index 217cf76..283a097 100644 --- a/core/java/android/content/RestrictionEntry.java +++ b/core/java/android/content/RestrictionEntry.java @@ -109,6 +109,7 @@ public class RestrictionEntry implements Parcelable { */ public RestrictionEntry(String key, String selectedString) { this.key = key; + this.type = TYPE_CHOICE; this.currentValue = selectedString; } @@ -119,6 +120,7 @@ public class RestrictionEntry implements Parcelable { */ public RestrictionEntry(String key, boolean selectedState) { this.key = key; + this.type = TYPE_BOOLEAN; setSelectedState(selectedState); } @@ -129,6 +131,7 @@ public class RestrictionEntry implements Parcelable { */ public RestrictionEntry(String key, String[] selectedStrings) { this.key = key; + this.type = TYPE_MULTI_SELECT; this.currentValues = selectedStrings; } diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 64eaf9b..1b997f0 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -293,7 +293,10 @@ public class PackageParser { pi.sharedUserLabel = p.mSharedUserLabel; pi.applicationInfo = generateApplicationInfo(p, flags, state, userId); pi.installLocation = p.installLocation; - pi.requiredForAllUsers = p.mRequiredForAllUsers; + if ((pi.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0 + || (pi.applicationInfo.flags&ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) { + pi.requiredForAllUsers = p.mRequiredForAllUsers; + } pi.restrictedAccountType = p.mRestrictedAccountType; pi.requiredAccountType = p.mRequiredAccountType; pi.firstInstallTime = firstInstallTime; @@ -1893,11 +1896,12 @@ public class PackageParser { false)) { ai.flags |= ApplicationInfo.FLAG_PERSISTENT; } - if (sa.getBoolean( - com.android.internal.R.styleable.AndroidManifestApplication_requiredForAllUsers, - false)) { - owner.mRequiredForAllUsers = true; - } + } + + if (sa.getBoolean( + com.android.internal.R.styleable.AndroidManifestApplication_requiredForAllUsers, + false)) { + owner.mRequiredForAllUsers = true; } String restrictedAccountType = sa.getString(com.android.internal.R.styleable |
