Merge "Do not display the indicator on high power location requests with the new behavior."
This commit is contained in:
committed by
Android (Google) Code Review
commit
cc2ca4ba87
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user