Added snoozing field to JSON, changed RingtoneActivity launch mode in manifest
This commit is contained in:
@@ -8,6 +8,7 @@ import android.content.Intent;
|
||||
import com.philliphsu.clock2.Alarm;
|
||||
import com.philliphsu.clock2.UpcomingAlarmReceiver;
|
||||
import com.philliphsu.clock2.ringtone.RingtoneActivity;
|
||||
import com.philliphsu.clock2.ringtone.RingtoneService;
|
||||
|
||||
import static android.app.PendingIntent.FLAG_CANCEL_CURRENT;
|
||||
import static android.app.PendingIntent.FLAG_NO_CREATE;
|
||||
@@ -57,6 +58,9 @@ public final class AlarmUtils {
|
||||
pi.cancel();
|
||||
|
||||
removeUpcomingAlarmNotification(c, a);
|
||||
|
||||
// If service is not running, nothing happens
|
||||
c.stopService(new Intent(c, RingtoneService.class));
|
||||
}
|
||||
|
||||
public static void removeUpcomingAlarmNotification(Context c, Alarm a) {
|
||||
|
||||
@@ -100,7 +100,8 @@ public class EditAlarmPresenter implements EditAlarmContract.Presenter {
|
||||
@Override
|
||||
public void stopSnoozing() {
|
||||
dismissNow(); // MUST be first, see AlarmUtils.notifyUpcomingAlarmIntent()
|
||||
mAlarm.stopSnoozing(); // TOneverDO: move this from last line
|
||||
mAlarm.stopSnoozing(); // TOneverDO: before dismissNow()
|
||||
mRepository.saveItems();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user