summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBilly Lau <billylau@google.com>2015-07-20 17:34:09 +0100
committerBilly Lau <billylau@google.com>2015-07-20 18:36:39 +0100
commit24b9c8314bf67637daf0d3b28440e0d5f08502c2 (patch)
tree3a9a1da3cfaa6d62d5a0f320bfd2d30135007177 /core
parentf7592b234acde62f0f0a93dad77284f12ca9980a (diff)
downloadframeworks_base-24b9c8314bf67637daf0d3b28440e0d5f08502c2.zip
frameworks_base-24b9c8314bf67637daf0d3b28440e0d5f08502c2.tar.gz
frameworks_base-24b9c8314bf67637daf0d3b28440e0d5f08502c2.tar.bz2
Bug: 22598083 Document how apps can detect WRITE_SETTINGS or SYSTEM_ALERT_WINDOW
through AppOps Expose OP_STR strings that describes the ops for WRITE_SETTINGS and SYSTEM_ALERT_WINDOW permissions such that apps can query AppOpsManager whether this capability is turned on or off by the user. Change-Id: I0e7a6f39e02389290232e450624b40ffb255abfb
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/AppOpsManager.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 08e1696..976830f 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -325,6 +325,12 @@ public class AppOpsManager {
/** Write external storage. */
public static final String OPSTR_WRITE_EXTERNAL_STORAGE
= "android:write_external_storage";
+ /** Required to draw on top of other apps. */
+ public static final String OPSTR_SYSTEM_ALERT_WINDOW
+ = "android:system_alert_window";
+ /** Required to write/modify/update system settingss. */
+ public static final String OPSTR_WRITE_SETTINGS
+ = "android:write_settings";
/**
* This maps each operation to the operation that serves as the
@@ -427,8 +433,8 @@ public class AppOpsManager {
OPSTR_SEND_SMS,
null,
null,
- null,
- null,
+ OPSTR_WRITE_SETTINGS,
+ OPSTR_SYSTEM_ALERT_WINDOW,
null,
OPSTR_CAMERA,
OPSTR_RECORD_AUDIO,