/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
D | WifiWakeupPreferenceControllerTest.java | 51 private LocationManager mLocationManager; field in WifiWakeupPreferenceControllerTest 63 mController.mLocationManager = mLocationManager; in setUp() 68 doReturn(true).when(mLocationManager).isLocationEnabled(); in setUp() 75 doReturn(true).when(mLocationManager).isLocationEnabled(); in setChecked_scanEnableLocationEnable_wifiWakeupEnable() 87 doReturn(true).when(mLocationManager).isLocationEnabled(); in updateState_wifiWakeupEnableScanningDisable_wifiWakeupDisabled() 101 doReturn(true).when(mLocationManager).isLocationEnabled(); in updateState_preferenceSetCheckedWhenWakeupSettingEnabled() 137 doReturn(false).when(mLocationManager).isLocationEnabled(); in updateState_preferenceSetUncheckedWhenWakeupSettingEnabledNoLocation() 150 doReturn(false).when(mLocationManager).isLocationEnabled(); in updateState_preferenceSetUncheckedWhenWakeupSettingDisabledLocationEnabled() 164 doReturn(false).when(mLocationManager).isLocationEnabled(); in updateState_preferenceSetUncheckedWhenWifiScanningDisabledLocationEnabled()
|
/packages/apps/Camera2/src/com/android/camera/app/ |
D | LegacyLocationProvider.java | 34 private android.location.LocationManager mLocationManager; field in LegacyLocationProvider 84 if (mLocationManager == null) { in startReceivingLocationUpdates() 85 mLocationManager = AndroidServices.instance().provideLocationManager(); in startReceivingLocationUpdates() 87 if (mLocationManager != null) { in startReceivingLocationUpdates() 89 mLocationManager.requestLocationUpdates( in startReceivingLocationUpdates() 100 mLocationManager.requestLocationUpdates( in startReceivingLocationUpdates() 116 if (mLocationManager != null) { in stopReceivingLocationUpdates() 119 mLocationManager.removeUpdates(mLocationListeners[i]); in stopReceivingLocationUpdates()
|
/packages/apps/LegacyCamera/src/com/android/camera/ |
D | LocationManager.java | 33 private android.location.LocationManager mLocationManager; field in LocationManager 75 if (mLocationManager == null) { in startReceivingLocationUpdates() 76 mLocationManager = (android.location.LocationManager) in startReceivingLocationUpdates() 79 if (mLocationManager != null) { in startReceivingLocationUpdates() 81 mLocationManager.requestLocationUpdates( in startReceivingLocationUpdates() 92 mLocationManager.requestLocationUpdates( in startReceivingLocationUpdates() 108 if (mLocationManager != null) { in stopReceivingLocationUpdates() 111 mLocationManager.removeUpdates(mLocationListeners[i]); in stopReceivingLocationUpdates()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/privacy/ |
D | LocationTogglePreferenceControllerTest.java | 57 private LocationManager mLocationManager; field in LocationTogglePreferenceControllerTest 70 mLocationManager = mContext.getSystemService(LocationManager.class); in setUp() 88 assertThat(mLocationManager.isLocationEnabledForUser(mUserHandle)).isFalse(); in onPreferenceClicked_clickLocationEnabled_shouldDisableLocation() 98 assertThat(mLocationManager.isLocationEnabledForUser(mUserHandle)).isTrue(); in onPreferenceClicked_clickMicDisabled_shouldEnableLocation() 106 mLocationManager.setLocationEnabledForUser(true, mUserHandle); in onListenerUpdate_locationDisabled_shouldUpdateChecked() 116 mLocationManager.setLocationEnabledForUser(false, mUserHandle); in onListenerUpdate_locationEnabled_shouldUpdateChecked() 123 mLocationManager.setLocationEnabledForUser(isLocationEnabled, mUserHandle); in initializePreference()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/ |
D | TopLevelLocationPreferenceControllerTest.java | 37 private LocationManager mLocationManager; field in TopLevelLocationPreferenceControllerTest 43 mLocationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); in setUp() 53 mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOff_shouldReturnStringForOff() 60 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOn_shouldShowLoadingString() 68 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsOne_shouldShowSingularString() 79 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsGreaterThanOne_shouldShowPluralString()
|
D | AppLocationPermissionPreferenceControllerTest.java | 35 private LocationManager mLocationManager; field in AppLocationPermissionPreferenceControllerTest 48 mLocationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); in setUp() 69 mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOff_shouldReturnStringForOff() 77 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOn_shouldReturnLoadingString() 85 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsOne_shouldShowSingularString() 95 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsGreaterThanOne_shouldShowPluralString()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/p2p/ |
D | WifiP2PPreferenceControllerTest.java | 64 private LocationManager mLocationManager; field in WifiP2PPreferenceControllerTest 77 when(mContext.getSystemService(eq(Service.LOCATION_SERVICE))).thenReturn(mLocationManager); in setUp() 103 when(mLocationManager.isLocationEnabled()).thenReturn(true); in testWifiStateChange_shouldToggleEnabledState() 121 when(mLocationManager.isLocationEnabled()).thenReturn(true); in testDisplayPreference_shouldToggleEnabledState() 130 when(mLocationManager.isLocationEnabled()).thenReturn(false); in testDisplayPreference_shouldToggleEnabledState() 138 when(mLocationManager.isLocationEnabled()).thenReturn(true); in updateState_withLocationDisabled_preferenceShouldBeDisable() 143 when(mLocationManager.isLocationEnabled()).thenReturn(false); in updateState_withLocationDisabled_preferenceShouldBeDisable()
|
/packages/apps/Car/tests/TestMediaApp/src/com/android/car/media/testmediaapp/ |
D | TmaForegroundService.java | 48 private LocationManager mLocationManager; field in TmaForegroundService 77 if (mLocationManager != null) { in onDestroy() 78 mLocationManager.removeUpdates(mLocationListener); in onDestroy() 101 if (mLocationManager != null) { in doWork() 104 mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE); in doWork() 106 mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, in doWork()
|
/packages/services/Car/service/src/com/android/car/ |
D | LocationManagerProxy.java | 33 private final LocationManager mLocationManager; field in LocationManagerProxy 42 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in LocationManagerProxy() 47 return mLocationManager.isLocationEnabled(); in isLocationEnabled() 52 return mLocationManager.injectLocation(location); in injectLocation() 60 return mLocationManager.getLastKnownLocation(provider); in getLastKnownLocation()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/location/ |
D | LocationStateSwitchPreferenceControllerTest.java | 55 private LocationManager mLocationManager; field in LocationStateSwitchPreferenceControllerTest 67 mLocationManager = mContext.getSystemService(LocationManager.class); in setUp() 88 mLocationManager.setLocationEnabledForUser(/* enabled= */ true, mUserHandle); in onIntentReceived_updateUi() 101 assertThat(mLocationManager.isLocationEnabledForUser(mUserHandle)).isTrue(); in onPreferenceClicked_locationDisabled_shouldEnable() 111 assertThat(mLocationManager.isLocationEnabledForUser(mUserHandle)).isFalse(); in onPreferenceClicked_locationEnabled_shouldDisable() 135 mLocationManager.setLocationEnabledForUser(checked, mUserHandle); in initializePreference()
|
D | RecentLocationRequestsEntryPreferenceControllerTest.java | 65 private LocationManager mLocationManager; field in RecentLocationRequestsEntryPreferenceControllerTest 77 mLocationManager = mContext.getSystemService(LocationManager.class); in setUp() 152 mLocationManager.setLocationEnabledForUser(enabled, in setLocationEnabled() 157 assertThat(mLocationManager.isLocationEnabled()).isEqualTo(enabled); in setLocationEnabled()
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | WifiWakeupPreferenceController.java | 59 LocationManager mLocationManager; field in WifiWakeupPreferenceController 76 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiWakeupPreferenceController() 99 && mLocationManager.isLocationEnabled(); in isChecked() 109 if (!mLocationManager.isLocationEnabled()) { in setChecked() 131 if (!mLocationManager.isLocationEnabled()) { in getSummary() 149 if (mLocationManager.isLocationEnabled() && getWifiScanningEnabled()) { in onActivityResult()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | ApplicationFeatureProviderImplTest.java | 90 private LocationManager mLocationManager; field in ApplicationFeatureProviderImplTest 103 when(mContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in setUp() 274 when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory() 275 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory() 305 when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); in getKeepEnabledPackages_hasEuiccComponent_shouldContainEuiccPackage() 306 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_hasEuiccComponent_shouldContainEuiccPackage() 327 when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); in getKeepEnabledPackages_shouldContainSettingsIntelligence() 328 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainSettingsIntelligence() 349 when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); in getKeepEnabledPackages_shouldContainPackageInstaller() 350 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainPackageInstaller()
|
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/preferences/ |
D | WifiWakeupTogglePreferenceController.java | 48 private LocationManager mLocationManager; field in WifiWakeupTogglePreferenceController 55 if (mLocationManager.isLocationEnabled()) { 77 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiWakeupTogglePreferenceController() 102 && mLocationManager.isLocationEnabled()); in updateState() 103 if (!mLocationManager.isLocationEnabled()) { in updateState() 112 if (!mLocationManager.isLocationEnabled()) { in handlePreferenceClicked()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/ |
D | TwilightLocationPreferenceControllerTest.java | 45 private LocationManager mLocationManager; field in TwilightLocationPreferenceControllerTest 51 when(mContext.getSystemService(LocationManager.class)).thenReturn(mLocationManager); in setUp() 57 when(mLocationManager.isLocationEnabled()).thenReturn(true); in getAvailabilityStatus_locationEnabled_shouldBeCONDITIONALLY_UNAVAILABLE() 64 when(mLocationManager.isLocationEnabled()).thenReturn(false); in getAvailabilityStatus_locationDisabled_shouldBeAVAILABLE_UNSEARCHABLE()
|
D | NightDisplayAutoModePreferenceControllerTest.java | 43 private LocationManager mLocationManager; field in NightDisplayAutoModePreferenceControllerTest 48 mLocationManager = Mockito.mock(LocationManager.class); in setUp() 49 when(mLocationManager.isLocationEnabled()).thenReturn(true); in setUp() 50 when(mContext.getSystemService(eq(LocationManager.class))).thenReturn(mLocationManager); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/ |
D | LocationTimeZoneDetectionPreferenceControllerTest.java | 57 private LocationManager mLocationManager; field in LocationTimeZoneDetectionPreferenceControllerTest 70 when(mContext.getSystemService(LocationManager.class)).thenReturn(mLocationManager); in setUp() 77 when(mLocationManager.isLocationEnabled()).thenReturn(true); in setChecked_withTrue_shouldUpdateSetting_whenLocationIsEnabled() 96 when(mLocationManager.isLocationEnabled()).thenReturn(false); in setChecked_withTrue_shouldDoNothing_whenLocationIsDisabled() 165 when(mLocationManager.isLocationEnabled()).thenReturn(false); in testLocationTimeZoneDetection_toggleIsOn_whenGeoDetectionEnabledAnsMlsIsOff()
|
/packages/apps/Settings/src/com/android/settings/wifi/p2p/ |
D | WifiP2pPreferenceController.java | 54 private final LocationManager mLocationManager; field in WifiP2pPreferenceController 74 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiP2pPreferenceController() 87 preference.setEnabled(mLocationManager.isLocationEnabled() && mWifiManager.isWifiEnabled()); in updateState() 116 && mLocationManager.isLocationEnabled()); in togglePreferences()
|
/packages/apps/Settings/src/com/android/settings/location/ |
D | AppLocationPermissionPreferenceController.java | 38 private final LocationManager mLocationManager; field in AppLocationPermissionPreferenceController 43 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in AppLocationPermissionPreferenceController() 55 if (mLocationManager.isLocationEnabled()) { in getSummary() 79 if (!mLocationManager.isLocationEnabled() || in updateState()
|
D | TopLevelLocationPreferenceController.java | 33 private final LocationManager mLocationManager; field in TopLevelLocationPreferenceController 43 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in TopLevelLocationPreferenceController() 53 if (mLocationManager.isLocationEnabled()) { in getSummary() 77 if (!mLocationManager.isLocationEnabled() || in updateState()
|
/packages/apps/Settings/src/com/android/settings/datetime/ |
D | LocationTimeZoneDetectionPreferenceController.java | 53 private final LocationManager mLocationManager; field in LocationTimeZoneDetectionPreferenceController 61 mLocationManager = context.getSystemService(LocationManager.class); in LocationTimeZoneDetectionPreferenceController() 78 if (isChecked && !mLocationManager.isLocationEnabled()) { in setChecked() 158 if (!mLocationManager.isLocationEnabled()) { in getSummary()
|
/packages/apps/Settings/src/com/android/settings/display/ |
D | TwilightLocationPreferenceController.java | 36 private final LocationManager mLocationManager; field in TwilightLocationPreferenceController 41 mLocationManager = context.getSystemService(LocationManager.class); in TwilightLocationPreferenceController() 60 return mLocationManager.isLocationEnabled() ? CONDITIONALLY_UNAVAILABLE in getAvailabilityStatus()
|
/packages/apps/Car/Settings/src/com/android/car/settings/location/ |
D | RecentLocationRequestsEntryPreferenceController.java | 42 private final LocationManager mLocationManager; field in RecentLocationRequestsEntryPreferenceController 53 mLocationManager = getContext().getSystemService(LocationManager.class); in RecentLocationRequestsEntryPreferenceController() 64 preference.setEnabled(mLocationManager.isLocationEnabled()); in updateState()
|
/packages/modules/GeoTZ/locationtzprovider/src/main/java/com/android/timezone/location/provider/ |
D | EnvironmentImpl.java | 140 @NonNull private final LocationManager mLocationManager; field in EnvironmentImpl 153 mLocationManager = context.getSystemService(LocationManager.class); in EnvironmentImpl() 332 mLocationManager.requestLocationUpdates( in startPassiveLocationListening() 339 mLocationManager.removeUpdates(locationListener); in startPassiveLocationListening() 372 mLocationManager.removeUpdates(locationListener); in startPassiveLocationListening() 431 mLocationManager.getCurrentLocation(
|
/packages/apps/Car/Settings/src/com/android/car/settings/privacy/ |
D | LocationTogglePreferenceController.java | 43 private final LocationManager mLocationManager; field in LocationTogglePreferenceController 55 mLocationManager = context.getSystemService(LocationManager.class); in LocationTogglePreferenceController() 86 preference.setSecondaryActionChecked(mLocationManager.isLocationEnabled()); in updateState()
|