Loading services/core/java/com/android/server/location/LocationManagerService.java +11 −4 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ public class LocationManagerService extends ILocationManager.Stub { private final AppForegroundHelper mAppForegroundHelper; private final LocationUsageLogger mLocationUsageLogger; @Nullable private GnssManagerService mGnssManagerService = null; @Nullable private volatile GnssManagerService mGnssManagerService = null; private final PassiveLocationProviderManager mPassiveManager; Loading Loading @@ -381,6 +381,10 @@ public class LocationManagerService extends ILocationManager.Stub { // prepare providers initializeProvidersLocked(); } // initialize gnss last because it has no awareness of boot phases and blindly assumes that // all other location providers are loaded at initialization initializeGnss(); } private void onAppOpChanged(String packageName) { Loading Loading @@ -602,16 +606,19 @@ public class LocationManagerService extends ILocationManager.Stub { } manager.setMockProvider(new MockProvider(properties)); } } // initialize gnss last because it has no awareness of boot phases and blindly assumes that // all other location providers are loaded at initialization private void initializeGnss() { // Do not hold mLock when calling GnssManagerService#isGnssSupported() which calls into HAL. if (GnssManagerService.isGnssSupported()) { mGnssManagerService = new GnssManagerService(mContext, mAppOpsHelper, mSettingsHelper, mAppForegroundHelper, mLocationUsageLogger); mGnssManagerService.onSystemReady(); LocationProviderManager gnssManager = new LocationProviderManager(GPS_PROVIDER); synchronized (mLock) { mProviderManagers.add(gnssManager); } gnssManager.setRealProvider(mGnssManagerService.getGnssLocationProvider()); // bind to geofence proxy Loading Loading
services/core/java/com/android/server/location/LocationManagerService.java +11 −4 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ public class LocationManagerService extends ILocationManager.Stub { private final AppForegroundHelper mAppForegroundHelper; private final LocationUsageLogger mLocationUsageLogger; @Nullable private GnssManagerService mGnssManagerService = null; @Nullable private volatile GnssManagerService mGnssManagerService = null; private final PassiveLocationProviderManager mPassiveManager; Loading Loading @@ -381,6 +381,10 @@ public class LocationManagerService extends ILocationManager.Stub { // prepare providers initializeProvidersLocked(); } // initialize gnss last because it has no awareness of boot phases and blindly assumes that // all other location providers are loaded at initialization initializeGnss(); } private void onAppOpChanged(String packageName) { Loading Loading @@ -602,16 +606,19 @@ public class LocationManagerService extends ILocationManager.Stub { } manager.setMockProvider(new MockProvider(properties)); } } // initialize gnss last because it has no awareness of boot phases and blindly assumes that // all other location providers are loaded at initialization private void initializeGnss() { // Do not hold mLock when calling GnssManagerService#isGnssSupported() which calls into HAL. if (GnssManagerService.isGnssSupported()) { mGnssManagerService = new GnssManagerService(mContext, mAppOpsHelper, mSettingsHelper, mAppForegroundHelper, mLocationUsageLogger); mGnssManagerService.onSystemReady(); LocationProviderManager gnssManager = new LocationProviderManager(GPS_PROVIDER); synchronized (mLock) { mProviderManagers.add(gnssManager); } gnssManager.setRealProvider(mGnssManagerService.getGnssLocationProvider()); // bind to geofence proxy Loading