OSDN Git Service

Revert "Adding the requiredForProfile flag."
authorNicolas Prévot <nprevot@google.com>
Thu, 24 Apr 2014 16:05:24 +0000 (16:05 +0000)
committerNicolas Prevot <nprevot@google.com>
Mon, 18 Aug 2014 11:51:11 +0000 (12:51 +0100)
This reverts commit 531270a4a177a9f245d328d9467c6d1adbd5354a.

BUG: 17102702

Change-Id: Iec5d047dc74bd4899662ede82c48fc024238427c

api/current.txt
core/java/android/content/pm/PackageInfo.java
core/java/android/content/pm/PackageParser.java
core/res/res/values/attrs_manifest.xml
core/res/res/values/public.xml

index 7b7e876..bc8d5d7 100644 (file)
@@ -1037,7 +1037,6 @@ package android {
     field public static final int required = 16843406; // 0x101028e
     field public static final int requiredAccountType = 16843734; // 0x10103d6
     field public static final int requiredForAllUsers = 16843728; // 0x10103d0
-    field public static final int requiredForProfile = 16843816; // 0x1010428
     field public static final int requiresFadingEdge = 16843685; // 0x10103a5
     field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364
     field public static final int resizeMode = 16843619; // 0x1010363
index a0e3c4a..765b2a9 100644 (file)
@@ -227,19 +227,6 @@ public class PackageInfo implements Parcelable {
     public static final int INSTALL_LOCATION_PREFER_EXTERNAL = 2;
 
     /**
-     * Flag for {@link #requiredForProfile}
-     * The application will always be installed for a restricted profile.
-     * @hide
-     */
-    public static final int RESTRICTED_PROFILE = 1;
-    /**
-     * Flag for {@link #requiredForProfile}
-     * The application will always be installed for a managed profile.
-     * @hide
-     */
-    public static final int MANAGED_PROFILE = 2;
-
-    /**
      * The install location requested by the package. From the
      * {@link android.R.attr#installLocation} attribute, one of
      * {@link #INSTALL_LOCATION_AUTO}, {@link #INSTALL_LOCATION_INTERNAL_ONLY},
@@ -247,12 +234,6 @@ public class PackageInfo implements Parcelable {
      */
     public int installLocation = INSTALL_LOCATION_INTERNAL_ONLY;
 
-    /**
-     * Defines which profiles this app is required for.
-     * @hide
-     */
-    public int requiredForProfile;
-
     /** @hide */
     public boolean requiredForAllUsers;
 
@@ -313,7 +294,6 @@ public class PackageInfo implements Parcelable {
         dest.writeTypedArray(featureGroups, parcelableFlags);
         dest.writeInt(installLocation);
         dest.writeInt(requiredForAllUsers ? 1 : 0);
-        dest.writeInt(requiredForProfile);
         dest.writeString(restrictedAccountType);
         dest.writeString(requiredAccountType);
         dest.writeString(overlayTarget);
@@ -358,7 +338,6 @@ public class PackageInfo implements Parcelable {
         featureGroups = source.createTypedArray(FeatureGroupInfo.CREATOR);
         installLocation = source.readInt();
         requiredForAllUsers = source.readInt() != 0;
-        requiredForProfile = source.readInt();
         restrictedAccountType = source.readString();
         requiredAccountType = source.readString();
         overlayTarget = source.readString();
index cddefb5..2c50f25 100644 (file)
@@ -413,7 +413,6 @@ public class PackageParser {
         if ((pi.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0
                 || (pi.applicationInfo.flags&ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
             pi.requiredForAllUsers = p.mRequiredForAllUsers;
-            pi.requiredForProfile = p.mRequiredForProfile;
         }
         pi.restrictedAccountType = p.mRestrictedAccountType;
         pi.requiredAccountType = p.mRequiredAccountType;
@@ -2477,8 +2476,6 @@ public class PackageParser {
                 false)) {
             owner.mRequiredForAllUsers = true;
         }
-        owner.mRequiredForProfile = sa.getInt(
-                com.android.internal.R.styleable.AndroidManifestApplication_requiredForProfile, 0);
 
         String restrictedAccountType = sa.getString(com.android.internal.R.styleable
                 .AndroidManifestApplication_restrictedAccountType);
@@ -4269,9 +4266,6 @@ public class PackageParser {
         /* An app that's required for all users and cannot be uninstalled for a user */
         public boolean mRequiredForAllUsers;
 
-        /* For which types of profile this app is required */
-        public int mRequiredForProfile;
-
         /* The restricted account authenticator type that is used by this application */
         public String mRestrictedAccountType;
 
index 7d4c37e..e905a3a 100644 (file)
          applications can request this feature. Default value is false. -->
     <attr name="requiredForAllUsers" format="boolean" />
 
-    <!-- Flag to specifiy for which types of profile this application needs to be present.
-         Only pre-installed applications can request this feature. Default is none. -->
-    <attr name="requiredForProfile">
-        <!-- This application needs to be present for restricted profiles -->
-        <flag name="restricted" value="0x0001" />
-        <!-- This application needs to be present for managed profiles -->
-        <flag name="managed" value="0x0002" />
-        <!-- This application needs to be present for all types of profiles -->
-        <flag name="all" value="0xFFFF" />
-    </attr>
-
     <!-- Flag indicating whether the application can be debugged, even when
          running on a device that is running in user mode. -->
     <attr name="debuggable" format="boolean" />
         <attr name="hasCode" format="boolean" />
         <attr name="persistent" />
         <attr name="requiredForAllUsers" />
-        <attr name="requiredForProfile" />
         <!-- Specify whether the components in this application are enabled or not (that is, can be
              instantiated by the system).
              If "false", it overrides any component specific values (a value of "true" will not
index c8edad0..27c8207 100644 (file)
   <public type="attr" name="strokeLineCap" />
   <public type="attr" name="strokeLineJoin" />
   <public type="attr" name="strokeMiterLimit" />
-  <public type="attr" name="requiredForProfile"/>
-  <public type="attr" name="colorControlNormal" />
+  <public type="attr" name="colorControlNormal" id="0x1010429"/>
   <public type="attr" name="colorControlActivated" />
   <public type="attr" name="colorButtonNormal" />
   <public type="attr" name="colorControlHighlight" />