Home
last modified time | relevance | path

Searched refs:mLocationManager (Results 1 – 25 of 32) sorted by relevance

12

/packages/apps/Camera2/src/com/android/camera/app/
DLegacyLocationProvider.java34 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/
DLocationManager.java33 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/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiWakeupPreferenceControllerTest.java55 private LocationManager mLocationManager; field in WifiWakeupPreferenceControllerTest
66 mController.mLocationManager = mLocationManager; in setUp()
70 doReturn(true).when(mLocationManager).isLocationEnabled(); in setUp()
103 doReturn(true).when(mLocationManager).isLocationEnabled(); in handlePreferenceTreeClick_wifiWakeupEnableScanningDisable_wifiWakeupEnable()
152 doReturn(false).when(mLocationManager).isLocationEnabled(); in updateState_preferenceSetUncheckedWhenWakeupSettingEnabledNoLocation()
165 doReturn(false).when(mLocationManager).isLocationEnabled(); in updateState_preferenceSetUncheckedWhenWakeupSettingDisabledLocationEnabled()
179 doReturn(false).when(mLocationManager).isLocationEnabled(); in updateState_preferenceSetUncheckedWhenWifiScanningDisabledLocationEnabled()
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DTopLevelLocationPreferenceControllerTest.java37 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()
DAppLocationPermissionPreferenceControllerTest.java32 private LocationManager mLocationManager; field in AppLocationPermissionPreferenceControllerTest
41 mLocationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); in setUp()
62 mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOff_shouldReturnStringForOff()
70 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOn_shouldReturnLoadingString()
78 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsOne_shouldShowSingularString()
88 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsGreaterThanOne_shouldShowPluralString()
/packages/services/Car/service/src/com/android/car/
DLocationManagerProxy.java31 private final LocationManager mLocationManager; field in LocationManagerProxy
40 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in LocationManagerProxy()
45 return mLocationManager.isLocationEnabled(); in isLocationEnabled()
50 return mLocationManager.injectLocation(location); in injectLocation()
58 return mLocationManager.getLastKnownLocation(provider); in getLastKnownLocation()
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/preferences/
DWifiWakeupTogglePreferenceController.java43 private final LocationManager mLocationManager; field in WifiWakeupTogglePreferenceController
48 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiWakeupTogglePreferenceController()
70 && mLocationManager.isLocationEnabled()); in updateState()
71 if (!mLocationManager.isLocationEnabled()) { in updateState()
80 if (!mLocationManager.isLocationEnabled()) { in handlePreferenceClicked()
147 if (mLocationManager.isLocationEnabled()) { in onWifiScanningEnabled()
/packages/apps/Settings/src/com/android/settings/wifi/
DWifiWakeupPreferenceController.java61 LocationManager mLocationManager; field in WifiWakeupPreferenceController
75 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiWakeupPreferenceController()
107 if (!mLocationManager.isLocationEnabled()) { in handlePreferenceTreeClick()
135 if (!mLocationManager.isLocationEnabled()) { in updateState()
153 if (mLocationManager.isLocationEnabled() && getWifiScanningEnabled()) { in onActivityResult()
182 && mLocationManager.isLocationEnabled(); in isWifiWakeupAvailable()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/
DWifiWakeupPreferenceController.java61 LocationManager mLocationManager; field in WifiWakeupPreferenceController
75 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiWakeupPreferenceController()
100 if (!mLocationManager.isLocationEnabled()) { in handlePreferenceTreeClick()
129 && mLocationManager.isLocationEnabled()); in updateState()
130 if (!mLocationManager.isLocationEnabled()) { in updateState()
148 if (mLocationManager.isLocationEnabled()) { in onActivityResult()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/location/
DLocationSettingsFragmentTest.java48 private LocationManager mLocationManager; field in LocationSettingsFragmentTest
54 mLocationManager = (LocationManager) RuntimeEnvironment.application in setUp()
83 assertThat(mLocationManager.isLocationEnabled()).isTrue(); in locationSwitch_checked_enablesLocation()
91 assertThat(mLocationManager.isLocationEnabled()).isTrue(); in locationSwitch_unchecked_disablesLocation()
95 assertThat(mLocationManager.isLocationEnabled()).isFalse(); in locationSwitch_unchecked_disablesLocation()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DApplicationFeatureProviderImplTest.java89 private LocationManager mLocationManager; field in ApplicationFeatureProviderImplTest
102 when(mContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in setUp()
273 when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory()
274 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory()
297 when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); in getKeepEnabledPackages_shouldContainSettingsIntelligence()
298 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainSettingsIntelligence()
319 when(mLocationManager.getExtraLocationControllerPackage()).thenReturn(testLocationHistory); in getKeepEnabledPackages_shouldContainPackageInstaller()
320 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainPackageInstaller()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/p2p/
DWifiP2PPreferenceControllerTest.java65 private LocationManager mLocationManager; field in WifiP2PPreferenceControllerTest
78 when(mContext.getSystemService(eq(Service.LOCATION_SERVICE))).thenReturn(mLocationManager); in setUp()
104 when(mLocationManager.isLocationEnabled()).thenReturn(true); in testWifiStateChange_shouldToggleEnabledState()
122 when(mLocationManager.isLocationEnabled()).thenReturn(true); in testDisplayPreference_shouldToggleEnabledState()
131 when(mLocationManager.isLocationEnabled()).thenReturn(false); in testDisplayPreference_shouldToggleEnabledState()
/packages/apps/Car/Settings/src/com/android/car/settings/location/
DLocationSettingsFragment.java46 private LocationManager mLocationManager; field in LocationSettingsFragment
51 mLocationSwitch.setChecked(mLocationManager.isLocationEnabled());
84 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in onAttach()
91 mLocationSwitch.setChecked(mLocationManager.isLocationEnabled()); in onStart()
DRecentLocationRequestsEntryPreferenceController.java41 private final LocationManager mLocationManager; field in RecentLocationRequestsEntryPreferenceController
52 mLocationManager = (LocationManager) getContext().getSystemService( in RecentLocationRequestsEntryPreferenceController()
64 preference.setEnabled(mLocationManager.isLocationEnabled()); in updateState()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/location/
DAppLocationPermissionPreferenceController.java33 private final LocationManager mLocationManager; field in AppLocationPermissionPreferenceController
38 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in AppLocationPermissionPreferenceController()
54 if (mLocationManager.isLocationEnabled()) { in getSummary()
73 if (!mLocationManager.isLocationEnabled()) { in updateState()
DTopLevelLocationPreferenceController.java28 private final LocationManager mLocationManager; field in TopLevelLocationPreferenceController
36 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in TopLevelLocationPreferenceController()
46 if (mLocationManager.isLocationEnabled()) { in getSummary()
70 if (!mLocationManager.isLocationEnabled()) { in updateState()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/p2p/
DWifiP2pPreferenceController.java54 private final LocationManager mLocationManager; field in WifiP2pPreferenceController
73 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiP2pPreferenceController()
86 preference.setEnabled(mLocationManager.isLocationEnabled() && mWifiManager.isWifiEnabled()); in updateState()
115 && mLocationManager.isLocationEnabled()); in togglePreferences()
/packages/apps/Settings/src/com/android/settings/wifi/p2p/
DWifiP2pPreferenceController.java54 private final LocationManager mLocationManager; field in WifiP2pPreferenceController
73 mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE); in WifiP2pPreferenceController()
86 preference.setEnabled(mLocationManager.isLocationEnabled() && mWifiManager.isWifiEnabled()); in updateState()
115 && mLocationManager.isLocationEnabled()); in togglePreferences()
/packages/apps/Settings/src/com/android/settings/location/
DAppLocationPermissionPreferenceController.java40 private final LocationManager mLocationManager; field in AppLocationPermissionPreferenceController
45 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in AppLocationPermissionPreferenceController()
61 if (mLocationManager.isLocationEnabled()) { in getSummary()
85 if (!mLocationManager.isLocationEnabled() || in updateState()
DTopLevelLocationPreferenceController.java33 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/Camera2/src/com/android/camera/captureintent/resource/
DResourceConstructedImpl.java47 private final LocationManager mLocationManager; field in ResourceConstructedImpl
111 mLocationManager = locationManager; in ResourceConstructedImpl()
168 return mLocationManager; in getLocationManager()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserServiceTest.java75 private LocationManager mLocationManager; field in CarUserServiceTest
98 doReturn(mLocationManager).when(mMockContext).getSystemService(Context.LOCATION_SERVICE); in setUpMocks()
199 verify(mLocationManager).setLocationEnabledForUser( in testDisableLocationForHeadlessSystemUserOnFirstRun()
212 verify(mLocationManager, never()).setLocationEnabledForUser( in testDisableLocationForRegularSystemUserOnFirstRun()
/packages/services/Telephony/tests/src/com/android/phone/
DLocationAccessPolicyTest.java154 @Mock LocationManager mLocationManager; field in LocationAccessPolicyTest
162 mockContextSystemService(LocationManager.class, mLocationManager); in setUp()
205 when(mLocationManager.isLocationEnabledForUser(any(UserHandle.class))).thenReturn(true); in setupScenario()
210 when(mLocationManager.isLocationEnabledForUser(any(UserHandle.class))) in setupScenario()
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DCellBroadcastHandler.java623 private final LocationManager mLocationManager; field in CellBroadcastHandler.LocationRequester
630 mLocationManager = locationManager; in LocationRequester()
682 if (mLocationManager.isProviderEnabled(provider)) { in requestLocationUpdateInternal()
683 mLocationManager.requestSingleUpdate(provider, mLocationListener, mLooper); in requestLocationUpdateInternal()
693 if (mLocationManager.isProviderEnabled(provider)) return true; in isLocationServiceAvailable()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/wifi/preferences/
DWifiWakeupTogglePreferenceControllerTest.java60 private LocationManager mLocationManager; field in WifiWakeupTogglePreferenceControllerTest
66 mLocationManager = (LocationManager) mContext.getSystemService(Service.LOCATION_SERVICE); in setUp()
232 mLocationManager.setLocationEnabledForUser(enabled, Process.myUserHandle()); in setLocationEnabled()

12