public static void pause() { ReminderSettings settings = getReminderSettings(); if (settings == null) { return; } if (settings.getReminder() != null) { removeAlarm(settings.getReminder().getVocabularyId()); // settings.getReminder().setTime(null); } settings.setStatus(ReminderSettings.Status.PAUSE); applyReminderSettings(settings); }
public static void stop() { setLastReminder(null); ReminderSettings settings = getReminderSettings(); if (settings == null) { return; } if (settings.getReminder() != null) { removeAlarm(settings.getReminder().getVocabularyId()); } settings.setStatus(ReminderSettings.Status.STOP); settings.setReminder(null); applyReminderSettings(settings); App.preferences.edit().putInt(SENT_WORDS_PER_DAY, 0).apply(); Vocabularies.resetLearnedVocabularies(); }