diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-09-22 12:31:38 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-09-23 09:35:21 -0700 |
commit | 9bb0ee9131b0fa8cf2720f200575ba2ede48a65c (patch) | |
tree | 98e66b59f5a84b0916aa8518999fa2f1c2e66aea /services | |
parent | 3ba21e979524367631de70dfc82075693d9c616d (diff) | |
download | frameworks_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 'services')
-rw-r--r-- | services/java/com/android/server/LocationManagerService.java | 5 | ||||
-rw-r--r-- | services/java/com/android/server/wm/WindowManagerService.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index b6ccce7..3e8770e 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -223,8 +223,9 @@ public class LocationManagerService extends ILocationManager.Stub { mGeofenceManager = new GeofenceManager(mContext, mBlacklist); // Monitor for app ops mode changes. - AppOpsManager.Callback callback = new AppOpsManager.Callback() { - public void opChanged(int op, String packageName) { + AppOpsManager.OnOpChangedListener callback + = new AppOpsManager.OnOpChangedInternalListener() { + public void onOpChanged(int op, String packageName) { synchronized (mLock) { for (Receiver receiver : mReceivers.values()) { receiver.updateMonitoring(true); diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index d063db5..e4f5c7c 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -754,9 +754,9 @@ public class WindowManagerService extends IWindowManager.Stub mBatteryStats = BatteryStatsService.getService(); mAppOps = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); mAppOps.startWatchingMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, null, - new AppOpsManager.Callback() { + new AppOpsManager.OnOpChangedInternalListener() { @Override - public void opChanged(int op, String packageName) { + public void onOpChanged(int op, String packageName) { updateAppOpsState(); } } |