* commit 'e40897a8808d62ead601982a7d7771d64a2359c6': Limits the broadcast to system apps only
This commit is contained in:
@@ -93,7 +93,7 @@ public abstract class LocationSettingsBase extends SettingsPreferenceFragment
|
|||||||
Intent intent = new Intent(MODE_CHANGING_ACTION);
|
Intent intent = new Intent(MODE_CHANGING_ACTION);
|
||||||
intent.putExtra(CURRENT_MODE_KEY, mCurrentMode);
|
intent.putExtra(CURRENT_MODE_KEY, mCurrentMode);
|
||||||
intent.putExtra(NEW_MODE_KEY, mode);
|
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);
|
Settings.Secure.putInt(getContentResolver(), Settings.Secure.LOCATION_MODE, mode);
|
||||||
refreshLocationMode();
|
refreshLocationMode();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user