Only prompt for importing system SMS db when we're the SMS app

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-10-28 16:50:45 -07:00
parent 02c781eb25
commit bd280ec895

View File

@ -58,6 +58,7 @@ import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.database.loaders.ConversationListLoader; import org.thoughtcrime.securesms.database.loaders.ConversationListLoader;
import org.thoughtcrime.securesms.notifications.MessageNotifier; import org.thoughtcrime.securesms.notifications.MessageNotifier;
import org.thoughtcrime.securesms.recipients.Recipients; import org.thoughtcrime.securesms.recipients.Recipients;
import org.thoughtcrime.securesms.util.Util;
import org.whispersystems.libaxolotl.util.guava.Optional; import org.whispersystems.libaxolotl.util.guava.Optional;
import java.util.Locale; import java.util.Locale;
@ -144,7 +145,7 @@ public class ConversationListFragment extends Fragment
return Optional.of(new ExpiredBuildReminder(context)); return Optional.of(new ExpiredBuildReminder(context));
} else if (DefaultSmsReminder.isEligible(context)) { } else if (DefaultSmsReminder.isEligible(context)) {
return Optional.of(new DefaultSmsReminder(context)); return Optional.of(new DefaultSmsReminder(context));
} else if (SystemSmsImportReminder.isEligible(context)) { } else if (Util.isDefaultSmsProvider(context) && SystemSmsImportReminder.isEligible(context)) {
return Optional.of((new SystemSmsImportReminder(context, masterSecret))); return Optional.of((new SystemSmsImportReminder(context, masterSecret)));
} else if (PushRegistrationReminder.isEligible(context)) { } else if (PushRegistrationReminder.isEligible(context)) {
return Optional.of((new PushRegistrationReminder(context, masterSecret))); return Optional.of((new PushRegistrationReminder(context, masterSecret)));