Do not display the indicator on high power location requests with the

new behavior.

Bug: 191503437
Test: atest LocationControllerImplTest
Change-Id: Id66b08bccea0cb9aa5b1fbdeb525dc9f57921e48
This commit is contained in:
Kate Montgomery
2022-02-14 21:10:18 +00:00
parent ef75d4bd83
commit 511837fdcd
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