Merge "Do not display the indicator on high power location requests with the new behavior."

This commit is contained in:
Kate Montgomery
2022-02-15 22:27:23 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 1 deletions

View File

@@ -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);
}

View File

@@ -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