Home
last modified time | relevance | path

Searched refs:isLocationEnabled (Results 1 – 25 of 38) sorted by relevance

12

/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiWakeupPreferenceControllerTest.java68 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/Settings/tests/robotests/src/com/android/settings/wifi/p2p/
DWifiP2PPreferenceControllerTest.java103 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/services/Car/tests/carservice_unit_test/src/com/android/car/
DLocationManagerProxyTest.java75 when(mMockLocationManager.isLocationEnabled()).thenReturn(true); in testLocationManagerProxyCanCheckIfLocationIsEnabled()
76 assertThat(mLocationManagerProxy.isLocationEnabled()).isTrue(); in testLocationManagerProxyCanCheckIfLocationIsEnabled()
78 when(mMockLocationManager.isLocationEnabled()).thenReturn(false); in testLocationManagerProxyCanCheckIfLocationIsEnabled()
79 assertThat(mLocationManagerProxy.isLocationEnabled()).isFalse(); in testLocationManagerProxyCanCheckIfLocationIsEnabled()
DCarLocationServiceTest.java404 when(mMockLocationManagerProxy.isLocationEnabled()).thenReturn(false); in testDeletesCacheFileWhenLocationIsDisabled()
410 verify(mMockLocationManagerProxy, times(1)).isLocationEnabled(); in testDeletesCacheFileWhenLocationIsDisabled()
421 when(mMockLocationManagerProxy.isLocationEnabled()).thenReturn(false); in testDeletesCacheFileUponSuspendExitWhileMoving()
431 verify(mMockLocationManagerProxy, times(0)).isLocationEnabled(); in testDeletesCacheFileUponSuspendExitWhileMoving()
442 when(mMockLocationManagerProxy.isLocationEnabled()).thenReturn(false); in testRegistersForDrivingStateChangesUponSuspendExit()
450 verify(mMockLocationManagerProxy, times(0)).isLocationEnabled(); in testRegistersForDrivingStateChangesUponSuspendExit()
463 when(mMockLocationManagerProxy.isLocationEnabled()).thenReturn(false); in testDeletesCacheFileWhenDrivingStateBecomesMoving()
475 verify(mMockLocationManagerProxy, times(0)).isLocationEnabled(); in testDeletesCacheFileWhenDrivingStateBecomesMoving()
/packages/apps/Settings/src/com/android/settings/wifi/
DWifiWakeupPreferenceController.java99 && mLocationManager.isLocationEnabled(); in isChecked()
109 if (!mLocationManager.isLocationEnabled()) { in setChecked()
131 if (!mLocationManager.isLocationEnabled()) { in getSummary()
149 if (mLocationManager.isLocationEnabled() && getWifiScanningEnabled()) { in onActivityResult()
/packages/services/Car/service/src/com/android/car/
DLocationManagerProxy.java46 public boolean isLocationEnabled() { in isLocationEnabled() method in LocationManagerProxy
47 return mLocationManager.isLocationEnabled(); in isLocationEnabled()
64 pw.printf("isLocationEnabled: %b\n", isLocationEnabled()); in dump()
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/preferences/
DWifiWakeupTogglePreferenceController.java55 if (mLocationManager.isLocationEnabled()) {
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/datetime/
DLocationTimeZoneDetectionPreferenceControllerTest.java77 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/tests/robotests/src/com/android/settings/display/
DTwilightLocationPreferenceControllerTest.java57 when(mLocationManager.isLocationEnabled()).thenReturn(true); in getAvailabilityStatus_locationEnabled_shouldBeCONDITIONALLY_UNAVAILABLE()
64 when(mLocationManager.isLocationEnabled()).thenReturn(false); in getAvailabilityStatus_locationDisabled_shouldBeAVAILABLE_UNSEARCHABLE()
DNightDisplayAutoModePreferenceControllerTest.java49 when(mLocationManager.isLocationEnabled()).thenReturn(true); in setUp()
/packages/services/BuiltInPrintService/src/com/android/bips/
DP2pPermissionManager.java142 if (!isLocationEnabled()) { in request()
276 boolean allowed = isLocationEnabled() && hasP2pPermission(); in getState()
291 private boolean isLocationEnabled() { in isLocationEnabled() method
/packages/apps/Settings/src/com/android/settings/wifi/p2p/
DWifiP2pPreferenceController.java87 preference.setEnabled(mLocationManager.isLocationEnabled() && mWifiManager.isWifiEnabled()); in updateState()
116 && mLocationManager.isLocationEnabled()); in togglePreferences()
/packages/apps/Settings/src/com/android/settings/location/
DAppLocationPermissionPreferenceController.java55 if (mLocationManager.isLocationEnabled()) { in getSummary()
79 if (!mLocationManager.isLocationEnabled() || in updateState()
DTopLevelLocationPreferenceController.java53 if (mLocationManager.isLocationEnabled()) { in getSummary()
77 if (!mLocationManager.isLocationEnabled() || in updateState()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/privacy/
DLocationTogglePreferenceControllerTest.java122 private void initializePreference(boolean isLocationEnabled) { in initializePreference() argument
123 mLocationManager.setLocationEnabledForUser(isLocationEnabled, mUserHandle); in initializePreference()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/
DLocationUtils.java83 public static boolean isLocationEnabled(Context context) { in isLocationEnabled() method in LocationUtils
84 return context.getSystemService(LocationManager.class).isLocationEnabled(); in isLocationEnabled()
/packages/apps/Settings/src/com/android/settings/datetime/
DLocationTimeZoneDetectionPreferenceController.java78 if (isChecked && !mLocationManager.isLocationEnabled()) { in setChecked()
158 if (!mLocationManager.isLocationEnabled()) { in getSummary()
/packages/modules/Connectivity/tests/cts/hostside/app/src/com/android/cts/net/hostside/
DNetworkPolicyTestUtils.java150 public static boolean isLocationEnabled() { in isLocationEnabled() method in NetworkPolicyTestUtils
153 return lm.isLocationEnabled(); in isLocationEnabled()
160 assertEquals("Couldn't change location enabled state", lm.isLocationEnabled(), enabled); in setLocationEnabled()
/packages/services/Car/car-lib/src/android/car/
DILocationManagerProxy.aidl22 boolean isLocationEnabled(); in isLocationEnabled() method
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowLocationManager.java44 protected boolean isLocationEnabled() { in isLocationEnabled() method in ShadowLocationManager
/packages/apps/Settings/src/com/android/settings/display/
DTwilightLocationPreferenceController.java60 return mLocationManager.isLocationEnabled() ? CONDITIONALLY_UNAVAILABLE in getAvailabilityStatus()
DNightDisplayAutoModePreferenceController.java75 && !mLocationManager.isLocationEnabled()) { in onPreferenceChange()
/packages/apps/Car/Settings/src/com/android/car/settings/location/
DRecentLocationRequestsEntryPreferenceController.java64 preference.setEnabled(mLocationManager.isLocationEnabled()); in updateState()
/packages/apps/Bluetooth/src/com/android/bluetooth/gatt/
DScanManager.java335 final boolean locationEnabled = mLocationManager.isLocationEnabled(); in handleStartScan()
439 || (requiresLocationOn(client) && !mLocationManager.isLocationEnabled())) { in handleSuspendScans()
453 && (!requiresLocationOn(client) || mLocationManager.isLocationEnabled())) { in handleResumeScans()
1388 final boolean locationEnabled = mLocationManager.isLocationEnabled();
/packages/apps/Car/Settings/src/com/android/car/settings/privacy/
DLocationTogglePreferenceController.java86 preference.setSecondaryActionChecked(mLocationManager.isLocationEnabled()); in updateState()

12