Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class LocationControllerImpl extends BroadcastReceiver implements Locatio } boolean highPowerOp = areActiveHighPowerLocationRequests(); mAreActiveLocationRequests = highPowerOp || shouldDisplay; mAreActiveLocationRequests = shouldDisplay; if (mAreActiveLocationRequests != hadActiveLocationRequests) { mHandler.sendEmptyMessage(H.MSG_LOCATION_ACTIVE_CHANGED); } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/LocationControllerImplTest.java +6 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,12 @@ public class LocationControllerImplTest extends SysuiTestCase { mTestableLooper.processAllMessages(); verify(callback, times(1)).onLocationActiveChanged(false); when(mAppOpsController.getActiveAppOps()).thenReturn(ImmutableList.of()); mLocationController.onActiveStateChanged(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, "com.google.android.googlequicksearchbox", true); mTestableLooper.processAllMessages(); verify(callback, times(1)).onLocationActiveChanged(true); } @Test Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class LocationControllerImpl extends BroadcastReceiver implements Locatio } boolean highPowerOp = areActiveHighPowerLocationRequests(); mAreActiveLocationRequests = highPowerOp || shouldDisplay; mAreActiveLocationRequests = shouldDisplay; if (mAreActiveLocationRequests != hadActiveLocationRequests) { mHandler.sendEmptyMessage(H.MSG_LOCATION_ACTIVE_CHANGED); } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/LocationControllerImplTest.java +6 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,12 @@ public class LocationControllerImplTest extends SysuiTestCase { mTestableLooper.processAllMessages(); verify(callback, times(1)).onLocationActiveChanged(false); when(mAppOpsController.getActiveAppOps()).thenReturn(ImmutableList.of()); mLocationController.onActiveStateChanged(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, "com.google.android.googlequicksearchbox", true); mTestableLooper.processAllMessages(); verify(callback, times(1)).onLocationActiveChanged(true); } @Test Loading