diff options
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/content/pm/PackageInfo.java | 5 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/core/java/android/content/pm/PackageInfo.java b/core/java/android/content/pm/PackageInfo.java index 33a6757..af1a6d5 100644 --- a/core/java/android/content/pm/PackageInfo.java +++ b/core/java/android/content/pm/PackageInfo.java @@ -224,6 +224,9 @@ public class PackageInfo implements Parcelable { /** @hide */ public String restrictedAccountType; + /** @hide */ + public String requiredAccountType; + public PackageInfo() { } @@ -266,6 +269,7 @@ public class PackageInfo implements Parcelable { dest.writeInt(installLocation); dest.writeInt(requiredForAllUsers ? 1 : 0); dest.writeString(restrictedAccountType); + dest.writeString(requiredAccountType); } public static final Parcelable.Creator<PackageInfo> CREATOR @@ -306,5 +310,6 @@ public class PackageInfo implements Parcelable { installLocation = source.readInt(); requiredForAllUsers = source.readInt() != 0; restrictedAccountType = source.readString(); + requiredAccountType = source.readString(); } } diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 5a50ec2..3586573 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -289,6 +289,7 @@ public class PackageParser { pi.installLocation = p.installLocation; pi.requiredForAllUsers = p.mRequiredForAllUsers; pi.restrictedAccountType = p.mRestrictedAccountType; + pi.requiredAccountType = p.mRequiredAccountType; pi.firstInstallTime = firstInstallTime; pi.lastUpdateTime = lastUpdateTime; if ((flags&PackageManager.GET_GIDS) != 0) { @@ -1816,13 +1817,19 @@ public class PackageParser { false)) { owner.mRequiredForAllUsers = true; } - String accountType = sa.getString(com.android.internal.R.styleable + String restrictedAccountType = sa.getString(com.android.internal.R.styleable .AndroidManifestApplication_restrictedAccountType); - if (accountType != null && accountType.length() > 0) { - owner.mRestrictedAccountType = accountType; + if (restrictedAccountType != null && restrictedAccountType.length() > 0) { + owner.mRestrictedAccountType = restrictedAccountType; } } + String requiredAccountType = sa.getString(com.android.internal.R.styleable + .AndroidManifestApplication_requiredAccountType); + if (requiredAccountType != null && requiredAccountType.length() > 0) { + owner.mRequiredAccountType = requiredAccountType; + } + if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_debuggable, false)) { @@ -3339,6 +3346,9 @@ public class PackageParser { /* The restricted account authenticator type that is used by this application */ public String mRestrictedAccountType; + /* The required account type without which this application will not function */ + public String mRequiredAccountType; + /** * Digest suitable for comparing whether this package's manifest is the * same as another. |