Loading core/java/android/content/pm/PackageInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading core/java/android/content/pm/PackageParser.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); Loading core/java/android/widget/AppSecurityPermissions.java +0 −6 Original line number Diff line number Diff line Loading @@ -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; } Loading core/res/AndroidManifest.xml +4 −4 Original line number Diff line number Diff line Loading @@ -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" /> Loading @@ -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" /> Loading @@ -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" /> Loading core/res/res/values/attrs_manifest.xml +3 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading Loading
core/java/android/content/pm/PackageInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
core/java/android/content/pm/PackageParser.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); Loading
core/java/android/widget/AppSecurityPermissions.java +0 −6 Original line number Diff line number Diff line Loading @@ -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; } Loading
core/res/AndroidManifest.xml +4 −4 Original line number Diff line number Diff line Loading @@ -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" /> Loading @@ -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" /> Loading @@ -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" /> Loading
core/res/res/values/attrs_manifest.xml +3 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading