summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--core/java/android/content/pm/PackageInfo.java2
-rw-r--r--core/java/android/content/pm/PackageManager.java1
-rw-r--r--core/java/android/content/pm/PackageParser.java3
-rw-r--r--core/res/res/values/attrs_manifest.xml5
5 files changed, 8 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt
index c0d150d..bba89c8 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6867,7 +6867,6 @@ package android.content.pm {
method public abstract boolean addPermission(android.content.pm.PermissionInfo);
method public abstract boolean addPermissionAsync(android.content.pm.PermissionInfo);
method public abstract deprecated void addPreferredActivity(android.content.IntentFilter, int, android.content.ComponentName[], android.content.ComponentName);
- method public android.content.Intent buildPermissionRequestIntent(java.lang.String...);
method public abstract java.lang.String[] canonicalToCurrentPackageNames(java.lang.String[]);
method public abstract int checkPermission(java.lang.String, java.lang.String);
method public abstract int checkSignatures(java.lang.String, java.lang.String);
diff --git a/core/java/android/content/pm/PackageInfo.java b/core/java/android/content/pm/PackageInfo.java
index fb539c5..33a6757 100644
--- a/core/java/android/content/pm/PackageInfo.java
+++ b/core/java/android/content/pm/PackageInfo.java
@@ -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;
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index da15e3b..30bdfef 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -1754,6 +1754,7 @@ public abstract class PackageManager {
/**
* Returns an {@link Intent} suitable for passing to {@code startActivityForResult}
* which prompts the user to grant {@code permissions} to this application.
+ * @hide
*
* @throws NullPointerException if {@code permissions} is {@code null}.
* @throws IllegalArgumentException if {@code permissions} contains {@code null}.
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 245aa51..0e22b7b 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1424,8 +1424,11 @@ public class PackageParser {
// that may change.
String name = sa.getNonResourceString(
com.android.internal.R.styleable.AndroidManifestUsesPermission_name);
+/*
boolean required = sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestUsesPermission_required, true);
+*/
+ boolean required = true; // Optional <uses-permission> not supported
sa.recycle();
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 2423ba8..09e96c2 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -996,8 +996,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
@@ -1040,7 +1041,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