Remove SMS reminder and settings

This commit is contained in:
daniel.boehrs 2018-08-31 11:44:46 +02:00
parent 4a32ecbb47
commit 66b30cf7ec
3 changed files with 4 additions and 15 deletions

View file

@ -5,10 +5,6 @@
<org.thoughtcrime.securesms.preferences.widgets.ProfilePreference
android:key="preference_category_profile"/>
<Preference android:key="preference_category_sms_mms"
android:title="@string/preferences__sms_mms"
android:icon="@drawable/ic_textsms_24dp"/>
<Preference android:key="preference_category_notifications"
android:title="@string/preferences__notifications"
android:icon="@drawable/ic_notifications_24dp"/>

View file

@ -40,7 +40,6 @@ import org.thoughtcrime.securesms.preferences.AppearancePreferenceFragment;
import org.thoughtcrime.securesms.preferences.ChatsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.CorrectedPreferenceFragment;
import org.thoughtcrime.securesms.preferences.NotificationsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.SmsMmsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.widgets.ProfilePreference;
import org.thoughtcrime.securesms.service.KeyCachingService;
import org.thoughtcrime.securesms.util.DynamicLanguage;
@ -61,7 +60,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
private static final String TAG = ApplicationPreferencesActivity.class.getSimpleName();
private static final String PREFERENCE_CATEGORY_PROFILE = "preference_category_profile";
private static final String PREFERENCE_CATEGORY_SMS_MMS = "preference_category_sms_mms";
private static final String PREFERENCE_CATEGORY_NOTIFICATIONS = "preference_category_notifications";
private static final String PREFERENCE_CATEGORY_APP_PROTECTION = "preference_category_app_protection";
private static final String PREFERENCE_CATEGORY_APPEARANCE = "preference_category_appearance";
@ -138,8 +136,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
this.findPreference(PREFERENCE_CATEGORY_PROFILE)
.setOnPreferenceClickListener(new ProfileClickListener());
this.findPreference(PREFERENCE_CATEGORY_SMS_MMS)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_SMS_MMS));
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_NOTIFICATIONS));
this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION)
@ -175,8 +171,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
private void setCategorySummaries() {
((ProfilePreference)this.findPreference(PREFERENCE_CATEGORY_PROFILE)).refresh();
this.findPreference(PREFERENCE_CATEGORY_SMS_MMS)
.setSummary(SmsMmsPreferenceFragment.getSummary(getActivity()));
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS)
.setSummary(NotificationsPreferenceFragment.getSummary(getActivity()));
this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION)
@ -217,7 +211,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
DrawableCompat.setTint(devices, color);
DrawableCompat.setTint(advanced, color);
this.findPreference(PREFERENCE_CATEGORY_SMS_MMS).setIcon(sms);
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS).setIcon(notifications);
this.findPreference(PREFERENCE_CATEGORY_APP_PROTECTION).setIcon(privacy);
this.findPreference(PREFERENCE_CATEGORY_APPEARANCE).setIcon(appearance);
@ -238,9 +231,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
Fragment fragment = null;
switch (category) {
case PREFERENCE_CATEGORY_SMS_MMS:
fragment = new SmsMmsPreferenceFragment();
break;
case PREFERENCE_CATEGORY_NOTIFICATIONS:
fragment = new NotificationsPreferenceFragment();
break;

View file

@ -14,6 +14,9 @@ import org.thoughtcrime.securesms.util.Util;
public class DefaultSmsReminder extends Reminder {
@SuppressWarnings("FieldCanBeLocal")
private static final boolean SUPPORTED = false;
@TargetApi(VERSION_CODES.KITKAT)
public DefaultSmsReminder(final Context context) {
super(context.getString(R.string.reminder_header_sms_default_title),
@ -44,6 +47,6 @@ public class DefaultSmsReminder extends Reminder {
TextSecurePreferences.setPromptedDefaultSmsProvider(context, false);
}
return !isDefault && !TextSecurePreferences.hasPromptedDefaultSmsProvider(context);
return SUPPORTED && !isDefault && !TextSecurePreferences.hasPromptedDefaultSmsProvider(context);
}
}