summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-09-22 12:31:38 -0700
committerDianne Hackborn <hackbod@google.com>2013-09-23 09:35:21 -0700
commit9bb0ee9131b0fa8cf2720f200575ba2ede48a65c (patch)
tree98e66b59f5a84b0916aa8518999fa2f1c2e66aea /api
parent3ba21e979524367631de70dfc82075693d9c616d (diff)
downloadframeworks_base-9bb0ee9131b0fa8cf2720f200575ba2ede48a65c.zip
frameworks_base-9bb0ee9131b0fa8cf2720f200575ba2ede48a65c.tar.gz
frameworks_base-9bb0ee9131b0fa8cf2720f200575ba2ede48a65c.tar.bz2
Issue #10461551: KLP API Review: AppOpsManager
Changed public constants from integers to strings. Internally everything is still integers, since we want that more efficient representation for most things. Changed the Callback interface to OnOpChangedListener. We also have a private versin that again takes an int, and tricks to make both work. Reworked the class documentation to be appropriate to the SDK (as much as it can be); most of the existing documentation is moved to the private implementation. Also added documentation of the MODE constants. Change-Id: I4f7e73cc99fe66beff9194e960e072e2aa9458f8
Diffstat (limited to 'api')
-rw-r--r--api/current.txt34
1 files changed, 15 insertions, 19 deletions
diff --git a/api/current.txt b/api/current.txt
index 49ce637..fd9f0be 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -3167,31 +3167,27 @@ package android.app {
}
public class AppOpsManager {
- method public int checkOp(int, int, java.lang.String);
- method public int checkOpNoThrow(int, int, java.lang.String);
+ method public int checkOp(java.lang.String, int, java.lang.String);
+ method public int checkOpNoThrow(java.lang.String, int, java.lang.String);
method public void checkPackage(int, java.lang.String);
- method public void finishOp(int, int, java.lang.String);
- method public void finishOp(int);
- method public int noteOp(int, int, java.lang.String);
- method public int noteOpNoThrow(int, int, java.lang.String);
- method public static java.lang.String opToName(int);
- method public int startOp(int, int, java.lang.String);
- method public int startOpNoThrow(int, int, java.lang.String);
- method public void startWatchingMode(int, java.lang.String, android.app.AppOpsManager.Callback);
- method public void stopWatchingMode(android.app.AppOpsManager.Callback);
+ method public void finishOp(java.lang.String, int, java.lang.String);
+ method public int noteOp(java.lang.String, int, java.lang.String);
+ method public int noteOpNoThrow(java.lang.String, int, java.lang.String);
+ method public int startOp(java.lang.String, int, java.lang.String);
+ method public int startOpNoThrow(java.lang.String, int, java.lang.String);
+ method public void startWatchingMode(int, java.lang.String, android.app.AppOpsManager.OnOpChangedListener);
+ method public void stopWatchingMode(android.app.AppOpsManager.OnOpChangedListener);
field public static final int MODE_ALLOWED = 0; // 0x0
field public static final int MODE_ERRORED = 2; // 0x2
field public static final int MODE_IGNORED = 1; // 0x1
- field public static final int OP_COARSE_LOCATION = 0; // 0x0
- field public static final int OP_FINE_LOCATION = 1; // 0x1
- field public static final int OP_GPS = 2; // 0x2
- field public static final int OP_MONITOR_HIGH_POWER_LOCATION = 42; // 0x2a
- field public static final int OP_MONITOR_LOCATION = 41; // 0x29
- field public static final int OP_NONE = -1; // 0xffffffff
+ field public static final java.lang.String OPSTR_COARSE_LOCATION = "android:coarse_location";
+ field public static final java.lang.String OPSTR_FINE_LOCATION = "android:fine_location";
+ field public static final java.lang.String OPSTR_MONITOR_HIGH_POWER_LOCATION = "android:monitor_location_high_power";
+ field public static final java.lang.String OPSTR_MONITOR_LOCATION = "android:monitor_location";
}
- public static abstract interface AppOpsManager.Callback {
- method public abstract void opChanged(int, java.lang.String);
+ public static abstract interface AppOpsManager.OnOpChangedListener {
+ method public abstract void onOpChanged(java.lang.String, java.lang.String);
}
public class Application extends android.content.ContextWrapper implements android.content.ComponentCallbacks2 {