/packages/apps/Car/Settings/src/com/android/car/settings/location/ |
D | LocationStateListenerBasePreferenceController.java | 20 import static android.location.LocationManager.EXTRA_ADAS_GNSS_ENABLED; 21 import static android.location.LocationManager.EXTRA_LOCATION_ENABLED; 28 import android.location.LocationManager; 65 private final LocationManager mLocationManager; 69 if (intent.getAction().equals(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED)) { 74 if (intent.getAction().equals(LocationManager.MODE_CHANGED_ACTION)) { 95 mLocationManager = context.getSystemService(LocationManager.class); in LocationStateListenerBasePreferenceController() 105 locationChangeFilter.addAction(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED); in onStartInternal() 108 locationChangeFilter.addAction(LocationManager.MODE_CHANGED_ACTION); in onStartInternal() 175 protected LocationManager getLocationManager() { in getLocationManager()
|
D | LocationUtil.java | 21 import android.location.LocationManager; 35 LocationManager locationManager = context.getSystemService(LocationManager.class); in isDriverWithAdasApps()
|
/packages/apps/LegacyCamera/src/com/android/camera/ |
D | LocationManager.java | 28 public class LocationManager { class 33 private android.location.LocationManager mLocationManager; 37 new LocationListener(android.location.LocationManager.GPS_PROVIDER), 38 new LocationListener(android.location.LocationManager.NETWORK_PROVIDER) 46 public LocationManager(Context context, Listener listener) { in LocationManager() method in LocationManager 76 mLocationManager = (android.location.LocationManager) in startReceivingLocationUpdates() 82 android.location.LocationManager.NETWORK_PROVIDER, in startReceivingLocationUpdates() 93 android.location.LocationManager.GPS_PROVIDER, in startReceivingLocationUpdates() 142 android.location.LocationManager.GPS_PROVIDER.equals(mProvider)) { in onLocationChanged() 169 android.location.LocationManager.GPS_PROVIDER.equals(provider)) { in onStatusChanged()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
D | LocationUtils.java | 19 import static android.location.LocationManager.EXTRA_ADAS_GNSS_ENABLED; 20 import static android.location.LocationManager.EXTRA_LOCATION_ENABLED; 31 import android.location.LocationManager; 92 return context.getSystemService(LocationManager.class).isLocationEnabled(); in isLocationEnabled() 98 return context.getSystemService(LocationManager.class).isAdasGnssLocationEnabled(); in isAutomotiveLocationBypassEnabled() 106 LocationManager locationManager = context.getSystemService(LocationManager.class); in getAutomotiveLocationBypassAllowlist() 108 LocationManager.class.getMethod("getAdasAllowlist").invoke(locationManager); in getAutomotiveLocationBypassAllowlist() 126 return context.getSystemService(LocationManager.class).isProviderPackage(packageName); in isLocationProvider() 138 && packageName.equals(context.getSystemService(LocationManager.class) in isLocationGroupAndControllerExtraPackage() 145 return context.getSystemService(LocationManager.class) in isExtraLocationControllerPackageEnabled() [all …]
|
/packages/services/Car/tests/AdasLocationTestApp/src/com/google/android/car/adaslocation/ |
D | AdasLocationActivity.java | 28 import android.location.LocationManager; 51 private LocationManager mLocationManager; 66 mLocationManager = getApplicationContext().getSystemService(LocationManager.class); in onCreate() 100 LocationManager.GPS_PROVIDER, request); in onCreate() 113 if (LocationManager.MODE_CHANGED_ACTION == intent.getAction()) { in onCreate() 118 if (LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED in onCreate() 141 intentFilter.addAction(LocationManager.MODE_CHANGED_ACTION); in onStart() 142 intentFilter.addAction(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED); in onStart() 191 LocationManager.GPS_PROVIDER, request, this.getMainExecutor(), mLocationListener); in startListening()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | LocationManagerProxyTest.java | 26 import android.location.LocationManager; 46 private LocationManager mMockLocationManager; 58 Location location = new Location(LocationManager.GPS_PROVIDER); in testLocationManagerProxyCanInjectLocation() 65 Location location = new Location(LocationManager.GPS_PROVIDER); in testLocationManagerProxyCanGetLastKnownLocation() 66 when(mMockLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER)) in testLocationManagerProxyCanGetLastKnownLocation() 69 .getLastKnownLocation(LocationManager.GPS_PROVIDER); in testLocationManagerProxyCanGetLastKnownLocation()
|
D | CarLocationServiceTest.java | 45 import android.location.LocationManager; 190 assertThat(intentFilter.getAction(0)).isEqualTo(LocationManager.MODE_CHANGED_ACTION); in testRegistersToReceiveEvents() 328 Location timbuktu = new Location(LocationManager.GPS_PROVIDER); in testStoresLocationUponShutdownPrepare() 334 when(mMockLocationManagerProxy.getLastKnownLocation(LocationManager.GPS_PROVIDER)) in testStoresLocationUponShutdownPrepare() 340 verify(mMockLocationManagerProxy).getLastKnownLocation(LocationManager.GPS_PROVIDER); in testStoresLocationUponShutdownPrepare() 387 when(mMockLocationManagerProxy.getLastKnownLocation(LocationManager.GPS_PROVIDER)) in testDoesNotStoreNullLocation() 394 verify(mMockLocationManagerProxy).getLastKnownLocation(LocationManager.GPS_PROVIDER); in testDoesNotStoreNullLocation() 416 new Intent(LocationManager.MODE_CHANGED_ACTION)); in testDeletesCacheFileWhenLocationIsDisabled()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | AfcManager.java | 23 import android.location.LocationManager; 59 private LocationManager mLocationManager; 154 return LocationManager.PASSIVE_PROVIDER.equals(provider); in isAcceptableProviderForLocationUpdates() 336 preferredProvidersInOrder = new String[] { LocationManager.FUSED_PROVIDER, in getProviderForLocationRequest() 337 LocationManager.NETWORK_PROVIDER, LocationManager.GPS_PROVIDER }; in getProviderForLocationRequest() 339 preferredProvidersInOrder = new String[] { LocationManager.NETWORK_PROVIDER, in getProviderForLocationRequest() 340 LocationManager.GPS_PROVIDER }; in getProviderForLocationRequest() 400 LocationManager getLocationManager() { in getLocationManager() 402 mLocationManager = mContext.getSystemService(LocationManager.class); in getLocationManager()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | AfcManagerTest.java | 35 import android.location.LocationManager; 69 @Mock LocationManager mLocationManager; 89 when(mContext.getSystemService(LocationManager.class)).thenReturn(mLocationManager); in setUp() 102 LocationManager.FUSED_PROVIDER, LocationManager.PASSIVE_PROVIDER, in setUp() 103 LocationManager.NETWORK_PROVIDER, LocationManager.GPS_PROVIDER)); in setUp() 234 LocationManager.PASSIVE_PROVIDER, LocationManager.NETWORK_PROVIDER, in testCorrectProviderUsedForGetLocation() 235 LocationManager.GPS_PROVIDER)); in testCorrectProviderUsedForGetLocation() 244 assertThat(provider).isEqualTo(LocationManager.NETWORK_PROVIDER); in testCorrectProviderUsedForGetLocation()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/location/ |
D | LocationStateListenerBasePreferenceControllerTest.java | 35 import android.location.LocationManager; 67 private LocationManager mLocationManager; 74 when(mContext.getSystemService(LocationManager.class)).thenReturn(mLocationManager); in setUp() 114 assertThat(actions.get(0).hasAction(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED)) in onAdasIntentReceived_refreshUi() 119 new Intent(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED)); in onAdasIntentReceived_refreshUi() 159 assertThat(actions.get(0).hasAction(LocationManager.MODE_CHANGED_ACTION)).isTrue(); in onLocationIntentReceived_refreshUi() 163 new Intent(LocationManager.MODE_CHANGED_ACTION)); in onLocationIntentReceived_refreshUi()
|
D | AdasLocationSwitchPreferenceControllerTest.java | 43 import android.location.LocationManager; 90 private LocationManager mLocationManager; 107 when(mContext.getSystemService(LocationManager.class)).thenReturn(mLocationManager); in setUp() 237 assertTrue(actions.get(0).hasAction(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED)); in onAdasIntentReceived_updateUi() 241 new Intent(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED)); in onAdasIntentReceived_updateUi() 261 assertTrue(actions.get(0).hasAction(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED)); in onAdasIntentReceived_updateUi_flagReq() 265 new Intent(LocationManager.ACTION_ADAS_GNSS_ENABLED_CHANGED)); in onAdasIntentReceived_updateUi_flagReq() 286 assertTrue(actions.get(0).hasAction(LocationManager.MODE_CHANGED_ACTION)); in onLocationIntentReceived_updateUi() 291 new Intent(LocationManager.MODE_CHANGED_ACTION)); in onLocationIntentReceived_updateUi() 312 assertTrue(actions.get(0).hasAction(LocationManager.MODE_CHANGED_ACTION)); in onLocationIntentReceived_updateUi_flagReq() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/location/ |
D | CountryDetector.java | 28 import android.location.LocationManager; 87 LocationManager locationManager, in CountryDetector() 103 private static void registerForLocationUpdates(Context context, LocationManager locationManager) { in registerForLocationUpdates() 118 LocationManager.PASSIVE_PROVIDER, in registerForLocationUpdates() 132 (LocationManager) context.getSystemService(Context.LOCATION_SERVICE), in getInstance() 205 if (!intent.hasExtra(LocationManager.KEY_LOCATION_CHANGED)) { in onReceive() 210 (Location) intent.getExtras().get(LocationManager.KEY_LOCATION_CHANGED); in onReceive()
|
/packages/apps/Camera2/src/com/android/camera/app/ |
D | LegacyLocationProvider.java | 34 private android.location.LocationManager mLocationManager; 38 new LocationListener(android.location.LocationManager.GPS_PROVIDER), 39 new LocationListener(android.location.LocationManager.NETWORK_PROVIDER) 90 android.location.LocationManager.NETWORK_PROVIDER, in startReceivingLocationUpdates() 101 android.location.LocationManager.GPS_PROVIDER, in startReceivingLocationUpdates()
|
/packages/services/Car/car-lib/src/android/car/test/ |
D | CarLocationTestHelper.java | 20 import android.location.LocationManager; 36 LocationManager locationManager = in injectLocation() 37 (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in injectLocation()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/ |
D | NightDisplayAutoModePreferenceControllerTest.java | 24 import android.location.LocationManager; 43 private LocationManager mLocationManager; 48 mLocationManager = Mockito.mock(LocationManager.class); in setUp() 50 when(mContext.getSystemService(eq(LocationManager.class))).thenReturn(mLocationManager); in setUp()
|
D | TwilightLocationPreferenceControllerTest.java | 27 import android.location.LocationManager; 45 private LocationManager mLocationManager; 51 when(mContext.getSystemService(LocationManager.class)).thenReturn(mLocationManager); in setUp()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/sensor/ |
D | LocationListeners.java | 26 import android.location.LocationManager; 40 LocationManager mLocationMgr; 126 mLocationMgr = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in LocationListeners() 168 if (mLocationMgr.isProviderEnabled(LocationManager.GPS_PROVIDER)) { in startListening() 169 mLocationMgr.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, in startListening() 185 if (mLocationMgr.isProviderEnabled(LocationManager.GPS_PROVIDER)) { in stopListening()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/statusicon/ui/ |
D | LocationStatusIconController.java | 24 import android.location.LocationManager; 46 LocationManager.MODE_CHANGED_ACTION); 50 private final LocationManager mLocationManager; 75 mLocationManager = context.getSystemService(LocationManager.class); in LocationStatusIconController()
|
/packages/apps/Camera2/src/com/android/camera/captureintent/resource/ |
D | ResourceConstructedImpl.java | 27 import com.android.camera.app.LocationManager; 47 private final LocationManager mLocationManager; 72 LocationManager locationManager, in create() 96 LocationManager locationManager, in ResourceConstructedImpl() 167 public LocationManager getLocationManager() { in getLocationManager()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/ |
D | UtilsTest.java | 28 import android.location.LocationManager; 103 LocationManager locationManager = context.getSystemService(LocationManager.class); in blockedByLocationOff() 117 LocationManager locationManager = context.getSystemService(LocationManager.class); in checkCallerHasCoarseLocation_doesNotCrash() 136 LocationManager locationManager = context.getSystemService(LocationManager.class); in checkCallerHasCoarseOrFineLocation_doesNotCrash()
|
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/ |
D | LocationPermissionChecker.java | 26 import android.location.LocationManager; 225 final LocationManager LocationManager = mContext.getSystemService(LocationManager.class); in isLocationModeEnabled() local 227 return LocationManager.isLocationEnabledForUser(UserHandle.of( in isLocationModeEnabled()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/ |
D | ShadowLocationManager.java | 20 import android.location.LocationManager; 28 @Implements(value = LocationManager.class) 40 LocationManager.MODE_CHANGED_ACTION)); in setLocationEnabledForUser()
|
/packages/services/Car/service/src/com/android/car/ |
D | LocationManagerProxy.java | 26 import android.location.LocationManager; 38 private final LocationManager mLocationManager; 47 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in LocationManagerProxy()
|
/packages/apps/Settings/src/com/android/settings/display/ |
D | TwilightLocationPreferenceController.java | 21 import android.location.LocationManager; 36 private final LocationManager mLocationManager; 41 mLocationManager = context.getSystemService(LocationManager.class); in TwilightLocationPreferenceController()
|
/packages/apps/Settings/src/com/android/settings/location/ |
D | TopLevelLocationPreferenceController.java | 10 import android.location.LocationManager; 33 new IntentFilter(LocationManager.MODE_CHANGED_ACTION); 34 private final LocationManager mLocationManager; 44 mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); in TopLevelLocationPreferenceController()
|