diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-10-02 10:34:02 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-10-02 10:36:15 -0700 |
commit | e4cb66fd77084b2642e519bb7f4c27ae7ef95939 (patch) | |
tree | ea3d90fa68a81aa01051dd06eb8320db88720e76 | |
parent | 27d3c0fe3775c85c2e25eb84089280cb217799c8 (diff) | |
download | frameworks_base-e4cb66fd77084b2642e519bb7f4c27ae7ef95939.zip frameworks_base-e4cb66fd77084b2642e519bb7f4c27ae7ef95939.tar.gz frameworks_base-e4cb66fd77084b2642e519bb7f4c27ae7ef95939.tar.bz2 |
Fix issue #11044267: AppOpsManager.startWatchingMode should take a String
Change-Id: I193a738f2e4ef147c22fb46cfa34ec14ad95d192
-rw-r--r-- | api/current.txt | 2 | ||||
-rw-r--r-- | core/java/android/app/AppOpsManager.java | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt index 2ed9c58..f82ddd5 100644 --- a/api/current.txt +++ b/api/current.txt @@ -3178,7 +3178,7 @@ package android.app { 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 startWatchingMode(java.lang.String, 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 diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index dce8cab..183927b 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -790,9 +790,21 @@ public class AppOpsManager { /** * Monitor for changes to the operating mode for the given op in the given app package. + * @param op The operation to monitor, one of OPSTR_*. + * @param packageName The name of the application to monitor. + * @param callback Where to report changes. + */ + public void startWatchingMode(String op, String packageName, + final OnOpChangedListener callback) { + startWatchingMode(strOpToOp(op), packageName, callback); + } + + /** + * Monitor for changes to the operating mode for the given op in the given app package. * @param op The operation to monitor, one of OP_*. * @param packageName The name of the application to monitor. * @param callback Where to report changes. + * @hide */ public void startWatchingMode(int op, String packageName, final OnOpChangedListener callback) { synchronized (mModeWatchers) { |