From a98128aff502c23c14b8c816ffd31bfea299fc47 Mon Sep 17 00:00:00 2001 From: Mike Lockwood <> Date: Thu, 2 Apr 2009 21:41:55 -0700 Subject: [PATCH] AI 144372: Cleanup Settings support for enabling and disabling location providers: LocationManagerService now listens for changes to settings, making LocationManager.updateProviders() unnecessary. Removed LocationManager.updateProviders() Added Settings.Secure.setLocationProviderEnabled(), which is a thread-safe way of enabling or disabling a single location provider. This is safer than reading, modifying and writing the LOCATION_PROVIDERS_ALLOWED directly. BUG=1729031 Automated import of CL 144372 --- apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java b/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java index db6385cae..56f43a461 100644 --- a/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java +++ b/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java @@ -38,9 +38,7 @@ public class DefaultActivity extends Activity { // Enable the GPS. // Not needed since this SDK will contain the Settings app. - LocationManager locationManager = (LocationManager)getSystemService(LOCATION_SERVICE); Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, LocationManager.GPS_PROVIDER); - locationManager.updateProviders(); // enable install from non market Settings.Secure.putInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS, 1);