summaryrefslogtreecommitdiffstats
path: root/core/java/android/content
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-07-01 12:30:54 -0700
committerDianne Hackborn <hackbod@google.com>2015-07-01 12:37:00 -0700
commitde15edaa9bf486a4050bb067317d313fd807bb10 (patch)
tree489bb47ee9025eaccb14fa979f3b3e583f92fcbf /core/java/android/content
parent80abf887a1578669d3167ea83d52a497a64ea491 (diff)
downloadframeworks_base-de15edaa9bf486a4050bb067317d313fd807bb10.zip
frameworks_base-de15edaa9bf486a4050bb067317d313fd807bb10.tar.gz
frameworks_base-de15edaa9bf486a4050bb067317d313fd807bb10.tar.bz2
Work on issue #21589105: Scope WRITE_SETTINGS and SYSTEM_ALERT_WINDOW...
...to an explicit toggle to enable in Settings Add a new permission flag, saying the permission can be automatically granted to pre-api-23 apps. Apply this to SYSTEM_ALERT_WINDOW. Change-Id: I24a0ceabe7e9f5e458a864d30eda2696ad14a699
Diffstat (limited to 'core/java/android/content')
-rw-r--r--core/java/android/content/pm/PermissionInfo.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PermissionInfo.java b/core/java/android/content/pm/PermissionInfo.java
index 04dbff2..0a1f148 100644
--- a/core/java/android/content/pm/PermissionInfo.java
+++ b/core/java/android/content/pm/PermissionInfo.java
@@ -76,6 +76,13 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
public static final int PROTECTION_FLAG_APPOP = 0x40;
/**
+ * Additional flag for {@link #protectionLevel}, corresponding
+ * to the <code>pre23</code> value of
+ * {@link android.R.attr#protectionLevel}.
+ */
+ public static final int PROTECTION_FLAG_PRE23 = 0x80;
+
+ /**
* Mask for {@link #protectionLevel}: the basic protection type.
*/
public static final int PROTECTION_MASK_BASE = 0xf;
@@ -171,6 +178,9 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
if ((level&PermissionInfo.PROTECTION_FLAG_APPOP) != 0) {
protLevel += "|appop";
}
+ if ((level&PermissionInfo.PROTECTION_FLAG_PRE23) != 0) {
+ protLevel += "|pre23";
+ }
return protLevel;
}