Loading core/java/android/app/AppOpsManager.java +12 −8 Original line number Diff line number Diff line Loading @@ -6553,14 +6553,15 @@ public class AppOpsManager { public interface OnOpNotedListener { /** * Called when an op was noted. * * @param code The op code. * @param uid The UID performing the operation. * @param packageName The package performing the operation. * @param attributionTag The attribution tag performing the operation. * @param flags The flags of this op * @param result The result of the note. */ void onOpNoted(int code, int uid, String packageName, @OpFlags int flags, @Mode int result); void onOpNoted(int code, int uid, String packageName, String attributionTag, @OpFlags int flags, @Mode int result); } /** Loading Loading @@ -6593,14 +6594,15 @@ public class AppOpsManager { * Called when an op was started. * * Note: This is only for op starts. It is not called when an op is noted or stopped. * * @param op The op code. * @param uid The UID performing the operation. * @param packageName The package performing the operation. * @param attributionTag The attribution tag performing the operation. * @param flags The flags of this op * @param result The result of the start. */ void onOpStarted(int op, int uid, String packageName, @OpFlags int flags, @Mode int result); void onOpStarted(int op, int uid, String packageName, String attributionTag, @OpFlags int flags, @Mode int result); } AppOpsManager(Context context, IAppOpsService service) { Loading Loading @@ -7183,8 +7185,9 @@ public class AppOpsManager { } cb = new IAppOpsStartedCallback.Stub() { @Override public void opStarted(int op, int uid, String packageName, int flags, int mode) { callback.onOpStarted(op, uid, packageName, flags, mode); public void opStarted(int op, int uid, String packageName, String attributionTag, int flags, int mode) { callback.onOpStarted(op, uid, packageName, attributionTag, flags, mode); } }; mStartedWatchers.put(callback, cb); Loading Loading @@ -7250,8 +7253,9 @@ public class AppOpsManager { } cb = new IAppOpsNotedCallback.Stub() { @Override public void opNoted(int op, int uid, String packageName, int flags, int mode) { callback.onOpNoted(op, uid, packageName, flags, mode); public void opNoted(int op, int uid, String packageName, String attributionTag, int flags, int mode) { callback.onOpNoted(op, uid, packageName, attributionTag, flags, mode); } }; mNotedWatchers.put(callback, cb); Loading core/java/com/android/internal/app/IAppOpsNotedCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,5 @@ package com.android.internal.app; // Iterface to observe op note/checks of ops oneway interface IAppOpsNotedCallback { void opNoted(int op, int uid, String packageName, int flags, int mode); void opNoted(int op, int uid, String packageName, String attributionTag, int flags, int mode); } core/java/com/android/internal/app/IAppOpsStartedCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,5 @@ package com.android.internal.app; // Iterface to observe op starts oneway interface IAppOpsStartedCallback { void opStarted(int op, int uid, String packageName, int flags, int mode); void opStarted(int op, int uid, String packageName, String attributionTag, int flags, int mode); } packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -473,7 +473,8 @@ public class AppOpsControllerImpl extends BroadcastReceiver implements AppOpsCon @Override public void onOpNoted(int code, int uid, String packageName, @AppOpsManager.OpFlags int flags, @AppOpsManager.Mode int result) { String attributionTag, @AppOpsManager.OpFlags int flags, @AppOpsManager.Mode int result) { if (DEBUG) { Log.w(TAG, "Noted op: " + code + " with result " + AppOpsManager.MODE_NAMES[result] + " for package " + packageName); Loading packages/SystemUI/tests/src/com/android/systemui/appops/AppOpsControllerTest.java +16 −15 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import java.util.List; @TestableLooper.RunWithLooper public class AppOpsControllerTest extends SysuiTestCase { private static final String TEST_PACKAGE_NAME = "test"; private static final String TEST_ATTRIBUTION_NAME = "attribution"; private static final int TEST_UID = UserHandle.getUid(0, 0); private static final int TEST_UID_OTHER = UserHandle.getUid(1, 0); private static final int TEST_UID_NON_USER_SENSITIVE = UserHandle.getUid(2, 0); Loading Loading @@ -164,7 +165,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged( AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mTestableLooper.processAllMessages(); verify(mCallback).onActiveStateChanged(AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true); Loading Loading @@ -218,8 +219,8 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_UID, TEST_PACKAGE_NAME, TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); assertEquals(3, mController.getActiveAppOps().size()); } Loading @@ -230,8 +231,8 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged(AppOpsManager.OP_CAMERA, TEST_UID_OTHER, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_UID, TEST_PACKAGE_NAME, TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); assertEquals(2, mController.getActiveAppOpsForUser(UserHandle.getUserId(TEST_UID)).size()); assertEquals(1, Loading Loading @@ -262,7 +263,7 @@ public class AppOpsControllerTest extends SysuiTestCase { public void opNotedScheduledForRemoval() { mController.setBGHandler(mMockHandler); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); verify(mMockHandler).scheduleRemoval(any(AppOpItem.class), anyLong()); } Loading @@ -274,7 +275,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); assertFalse(mController.getActiveAppOps().isEmpty()); mController.setListening(false); Loading @@ -288,9 +289,9 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.setBGHandler(mMockHandler); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); // Only one post to notify subscribers verify(mMockHandler, times(1)).post(any()); Loading @@ -304,9 +305,9 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.setBGHandler(mMockHandler); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); // Only one post to notify subscribers verify(mMockHandler, times(2)).scheduleRemoval(any(), anyLong()); Loading @@ -324,7 +325,7 @@ public class AppOpsControllerTest extends SysuiTestCase { AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); // Check that we "scheduled" the removal. Don't actually schedule until we are ready to // process messages at a later time. Loading Loading @@ -353,7 +354,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.addCallback(new int[]{AppOpsManager.OP_FINE_LOCATION}, mCallback); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpActiveChanged( AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); Loading Loading @@ -382,7 +383,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.addCallback(new int[]{AppOpsManager.OP_FINE_LOCATION}, mCallback); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpActiveChanged( AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); Loading @@ -400,7 +401,7 @@ public class AppOpsControllerTest extends SysuiTestCase { AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mTestableLooper.processAllMessages(); verify(mCallback).onActiveStateChanged( Loading Loading
core/java/android/app/AppOpsManager.java +12 −8 Original line number Diff line number Diff line Loading @@ -6553,14 +6553,15 @@ public class AppOpsManager { public interface OnOpNotedListener { /** * Called when an op was noted. * * @param code The op code. * @param uid The UID performing the operation. * @param packageName The package performing the operation. * @param attributionTag The attribution tag performing the operation. * @param flags The flags of this op * @param result The result of the note. */ void onOpNoted(int code, int uid, String packageName, @OpFlags int flags, @Mode int result); void onOpNoted(int code, int uid, String packageName, String attributionTag, @OpFlags int flags, @Mode int result); } /** Loading Loading @@ -6593,14 +6594,15 @@ public class AppOpsManager { * Called when an op was started. * * Note: This is only for op starts. It is not called when an op is noted or stopped. * * @param op The op code. * @param uid The UID performing the operation. * @param packageName The package performing the operation. * @param attributionTag The attribution tag performing the operation. * @param flags The flags of this op * @param result The result of the start. */ void onOpStarted(int op, int uid, String packageName, @OpFlags int flags, @Mode int result); void onOpStarted(int op, int uid, String packageName, String attributionTag, @OpFlags int flags, @Mode int result); } AppOpsManager(Context context, IAppOpsService service) { Loading Loading @@ -7183,8 +7185,9 @@ public class AppOpsManager { } cb = new IAppOpsStartedCallback.Stub() { @Override public void opStarted(int op, int uid, String packageName, int flags, int mode) { callback.onOpStarted(op, uid, packageName, flags, mode); public void opStarted(int op, int uid, String packageName, String attributionTag, int flags, int mode) { callback.onOpStarted(op, uid, packageName, attributionTag, flags, mode); } }; mStartedWatchers.put(callback, cb); Loading Loading @@ -7250,8 +7253,9 @@ public class AppOpsManager { } cb = new IAppOpsNotedCallback.Stub() { @Override public void opNoted(int op, int uid, String packageName, int flags, int mode) { callback.onOpNoted(op, uid, packageName, flags, mode); public void opNoted(int op, int uid, String packageName, String attributionTag, int flags, int mode) { callback.onOpNoted(op, uid, packageName, attributionTag, flags, mode); } }; mNotedWatchers.put(callback, cb); Loading
core/java/com/android/internal/app/IAppOpsNotedCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,5 @@ package com.android.internal.app; // Iterface to observe op note/checks of ops oneway interface IAppOpsNotedCallback { void opNoted(int op, int uid, String packageName, int flags, int mode); void opNoted(int op, int uid, String packageName, String attributionTag, int flags, int mode); }
core/java/com/android/internal/app/IAppOpsStartedCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,5 @@ package com.android.internal.app; // Iterface to observe op starts oneway interface IAppOpsStartedCallback { void opStarted(int op, int uid, String packageName, int flags, int mode); void opStarted(int op, int uid, String packageName, String attributionTag, int flags, int mode); }
packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -473,7 +473,8 @@ public class AppOpsControllerImpl extends BroadcastReceiver implements AppOpsCon @Override public void onOpNoted(int code, int uid, String packageName, @AppOpsManager.OpFlags int flags, @AppOpsManager.Mode int result) { String attributionTag, @AppOpsManager.OpFlags int flags, @AppOpsManager.Mode int result) { if (DEBUG) { Log.w(TAG, "Noted op: " + code + " with result " + AppOpsManager.MODE_NAMES[result] + " for package " + packageName); Loading
packages/SystemUI/tests/src/com/android/systemui/appops/AppOpsControllerTest.java +16 −15 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import java.util.List; @TestableLooper.RunWithLooper public class AppOpsControllerTest extends SysuiTestCase { private static final String TEST_PACKAGE_NAME = "test"; private static final String TEST_ATTRIBUTION_NAME = "attribution"; private static final int TEST_UID = UserHandle.getUid(0, 0); private static final int TEST_UID_OTHER = UserHandle.getUid(1, 0); private static final int TEST_UID_NON_USER_SENSITIVE = UserHandle.getUid(2, 0); Loading Loading @@ -164,7 +165,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged( AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mTestableLooper.processAllMessages(); verify(mCallback).onActiveStateChanged(AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true); Loading Loading @@ -218,8 +219,8 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_UID, TEST_PACKAGE_NAME, TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); assertEquals(3, mController.getActiveAppOps().size()); } Loading @@ -230,8 +231,8 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged(AppOpsManager.OP_CAMERA, TEST_UID_OTHER, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_UID, TEST_PACKAGE_NAME, TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); assertEquals(2, mController.getActiveAppOpsForUser(UserHandle.getUserId(TEST_UID)).size()); assertEquals(1, Loading Loading @@ -262,7 +263,7 @@ public class AppOpsControllerTest extends SysuiTestCase { public void opNotedScheduledForRemoval() { mController.setBGHandler(mMockHandler); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); verify(mMockHandler).scheduleRemoval(any(AppOpItem.class), anyLong()); } Loading @@ -274,7 +275,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.onOpActiveChanged(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); assertFalse(mController.getActiveAppOps().isEmpty()); mController.setListening(false); Loading @@ -288,9 +289,9 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.setBGHandler(mMockHandler); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); // Only one post to notify subscribers verify(mMockHandler, times(1)).post(any()); Loading @@ -304,9 +305,9 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.setBGHandler(mMockHandler); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); // Only one post to notify subscribers verify(mMockHandler, times(2)).scheduleRemoval(any(), anyLong()); Loading @@ -324,7 +325,7 @@ public class AppOpsControllerTest extends SysuiTestCase { AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); // Check that we "scheduled" the removal. Don't actually schedule until we are ready to // process messages at a later time. Loading Loading @@ -353,7 +354,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.addCallback(new int[]{AppOpsManager.OP_FINE_LOCATION}, mCallback); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpActiveChanged( AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); Loading Loading @@ -382,7 +383,7 @@ public class AppOpsControllerTest extends SysuiTestCase { mController.addCallback(new int[]{AppOpsManager.OP_FINE_LOCATION}, mCallback); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mController.onOpActiveChanged( AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); Loading @@ -400,7 +401,7 @@ public class AppOpsControllerTest extends SysuiTestCase { AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, true); mController.onOpNoted(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); TEST_ATTRIBUTION_NAME, AppOpsManager.OP_FLAG_SELF, AppOpsManager.MODE_ALLOWED); mTestableLooper.processAllMessages(); verify(mCallback).onActiveStateChanged( Loading