Fix default SMS app intent >= N

Fixes #7964
This commit is contained in:
Moxie Marlinspike 2018-07-10 10:09:19 -07:00
parent 4df1743ed1
commit bc60cba2b8

View File

@ -72,7 +72,10 @@ public class SmsMmsPreferenceFragment extends CorrectedPreferenceFragment {
Preference defaultPreference = findPreference(KITKAT_DEFAULT_PREF);
if (Util.isDefaultSmsProvider(getActivity())) {
defaultPreference.setIntent(new Intent(Settings.ACTION_WIRELESS_SETTINGS));
if (VERSION.SDK_INT < VERSION_CODES.M) defaultPreference.setIntent(new Intent(Settings.ACTION_WIRELESS_SETTINGS));
if (VERSION.SDK_INT < VERSION_CODES.N) defaultPreference.setIntent(new Intent(Settings.ACTION_SETTINGS));
else defaultPreference.setIntent(new Intent(Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS));
defaultPreference.setTitle(getString(R.string.ApplicationPreferencesActivity_sms_enabled));
defaultPreference.setSummary(getString(R.string.ApplicationPreferencesActivity_touch_to_change_your_default_sms_app));
} else {