Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79af6063 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Hide the optional permission stuff, not making it in to JB."

parents 450c75a5 e8241200
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ public class PackageInfo implements Parcelable {
    /**
     * Flag for {@link #requestedPermissionsFlags}: the requested permission
     * is required for the application to run; the user can not optionally
     * disable it.
     * disable it.  Currently all permissions are required.
     */
    public static final int REQUESTED_PERMISSION_REQUIRED = 1<<0;

+3 −1
Original line number Diff line number Diff line
@@ -989,14 +989,16 @@ public class PackageParser {
                // that may change.
                String name = sa.getNonResourceString(
                        com.android.internal.R.styleable.AndroidManifestUsesPermission_name);
                /* Not supporting optional permissions yet.
                boolean required = sa.getBoolean(
                        com.android.internal.R.styleable.AndroidManifestUsesPermission_required, true);
                */

                sa.recycle();

                if (name != null && !pkg.requestedPermissions.contains(name)) {
                    pkg.requestedPermissions.add(name.intern());
                    pkg.requestedPermissionsRequired.add(required ? Boolean.TRUE : Boolean.FALSE);
                    pkg.requestedPermissionsRequired.add(Boolean.TRUE);
                }

                XmlUtils.skipCurrentTag(parser);
+0 −6
Original line number Diff line number Diff line
@@ -490,13 +490,7 @@ public class AppSecurityPermissions implements View.OnClickListener {
        // Development permissions are only shown to the user if they are already
        // granted to the app -- if we are installing an app and they are not
        // already granted, they will not be granted as part of the install.
        // Note we also need the app to have specified this permission is not
        // required -- this is not technically needed, but it helps various things
        // if we ensure apps always mark development permissions as option, so that
        // even not knowing what a permission is we can still know whether it will
        // be granted to the app when it is installed.
        if ((existingReqFlags&PackageInfo.REQUESTED_PERMISSION_GRANTED) != 0
                && (newReqFlags&PackageInfo.REQUESTED_PERMISSION_REQUIRED) == 0
                && (pInfo.protectionLevel & PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) {
            return true;
        }
+4 −4
Original line number Diff line number Diff line
@@ -1082,7 +1082,7 @@
    <!-- Configure an application for debugging. -->
    <permission android:name="android.permission.SET_DEBUG_APP"
        android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
        android:protectionLevel="dangerous"
        android:protectionLevel="signature|system|development"
        android:label="@string/permlab_setDebugApp"
        android:description="@string/permdesc_setDebugApp" />

@@ -1090,7 +1090,7 @@
         application processes that can be running. -->
    <permission android:name="android.permission.SET_PROCESS_LIMIT"
        android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
        android:protectionLevel="dangerous"
        android:protectionLevel="signature|system|development"
        android:label="@string/permlab_setProcessLimit"
        android:description="@string/permdesc_setProcessLimit" />

@@ -1098,14 +1098,14 @@
         finished when put in the background. -->
    <permission android:name="android.permission.SET_ALWAYS_FINISH"
        android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
        android:protectionLevel="dangerous"
        android:protectionLevel="signature|system|development"
        android:label="@string/permlab_setAlwaysFinish"
        android:description="@string/permdesc_setAlwaysFinish" />

    <!-- Allow an application to request that a signal be sent to all persistent processes -->
    <permission android:name="android.permission.SIGNAL_PERSISTENT_PROCESSES"
        android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
        android:protectionLevel="dangerous"
        android:protectionLevel="signature|system|development"
        android:label="@string/permlab_signalPersistentProcesses"
        android:description="@string/permdesc_signalPersistentProcesses" />

+3 −2
Original line number Diff line number Diff line
@@ -948,8 +948,9 @@
              permission, and it must always be granted when it is installed.
              If you set this to false, then in some cases the application may
              be installed with it being granted the permission, and it will
              need to request the permission later if it needs it. -->
              need to request the permission later if it needs it.
        <attr name="required" format="boolean" />
        -->
    </declare-styleable>

    <!-- The <code>uses-configuration</code> tag specifies
@@ -992,7 +993,7 @@
              don't support it.  If you set this to false, then this will
              not impose a restriction on where the application can be
              installed. -->
        <attr name="required" />
        <attr name="required" format="boolean" />
    </declare-styleable>

    <!-- The <code>uses-sdk</code> tag describes the SDK features that the