am 9dc55e34: am 8a4c53ac: Limits the broadcast to system apps only

* commit '9dc55e348af75d7f22090de03e2a123bf961ab08':
  Limits the broadcast to system apps only
This commit is contained in:
Lifu Tang
2013-10-08 21:34:17 -07:00
committed by Android Git Automerger

View 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();
}