summaryrefslogtreecommitdiffstats
path: root/core/java/android/content
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-04-13 22:54:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-13 22:54:01 +0000
commite188c984ddd4ae4b109c3f204b03a8f798f7e9e8 (patch)
tree0c10cf086f32f030492ec4bc173176bb1f46fc8e /core/java/android/content
parenta068eeddc9d47af1a12afbe6efe7d00e8e903b9f (diff)
parentccbe389b4d2cee16da77685c88fa1475bc08cdb9 (diff)
downloadframeworks_base-e188c984ddd4ae4b109c3f204b03a8f798f7e9e8.zip
frameworks_base-e188c984ddd4ae4b109c3f204b03a8f798f7e9e8.tar.gz
frameworks_base-e188c984ddd4ae4b109c3f204b03a8f798f7e9e8.tar.bz2
Merge "Introducing manifest flag requiredAccountType" into jb-mr2-dev
Diffstat (limited to 'core/java/android/content')
-rw-r--r--core/java/android/content/pm/PackageInfo.java5
-rw-r--r--core/java/android/content/pm/PackageParser.java16
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.