OSDN Git Service

Limits the broadcast to system apps only
authorLifu Tang <lifu@google.com>
Tue, 8 Oct 2013 23:23:52 +0000 (16:23 -0700)
committerLifu Tang <lifu@google.com>
Tue, 8 Oct 2013 23:23:52 +0000 (16:23 -0700)
- Part of b/10974059

Change-Id: I1f0b6eeece88a2ee29b76636b9ce58dcc3d71aad

src/com/android/settings/location/LocationSettingsBase.java

index de18a0e..86c2ee5 100644 (file)
@@ -93,7 +93,7 @@ public abstract class LocationSettingsBase extends SettingsPreferenceFragment
         Intent intent = new Intent(MODE_CHANGING_ACTION);
         intent.putExtra(CURRENT_MODE_KEY, mCurrentMode);
         intent.putExtra(NEW_MODE_KEY, mode);
-        getActivity().sendBroadcast(intent);
+        getActivity().sendBroadcast(intent, android.Manifest.permission.WRITE_SECURE_SETTINGS);
         Settings.Secure.putInt(getContentResolver(), Settings.Secure.LOCATION_MODE, mode);
         refreshLocationMode();
     }