Merge "Fix issue #11044267: AppOpsManager.startWatchingMode should take a String" into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d143d1ffd7
@@ -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
|
||||
|
||||
@@ -788,11 +788,23 @@ 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) {
|
||||
|
||||
Reference in New Issue
Block a user