Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d091ee89 authored by Chiao Cheng's avatar Chiao Cheng Committed by Isaac Katzenelson
Browse files

Minor alarm in-place editing tweaks.

- Toggle off repeat removes all repeat state from underlying alarm in addition
  to hiding the visual display.
- Changing time turns alarm on automatically.

Bug: 7289559
Change-Id: Ifbc4d1c7d994ec93717e2fd5b9267c9740ca1e82
parent e40b3120
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ public class AlarmClock extends Activity implements LoaderManager.LoaderCallback
    public void onDialogTimeSet(Alarm alarm, int hourOfDay, int minute) {
        alarm.hour = hourOfDay;
        alarm.minutes = minute;
        alarm.enabled = true;
        asyncUpdateAlarm(alarm);
    }

@@ -477,6 +478,10 @@ public class AlarmClock extends Activity implements LoaderManager.LoaderCallback
                        itemHolder.repeatDays.setVisibility(View.GONE);
                        itemHolder.repeat.setTextColor(mColorDim);
                        mRepeatChecked.remove(alarm.id);

                        // Remove all repeat days
                        alarm.daysOfWeek.set(new Alarm.DaysOfWeek(0));
                        asyncUpdateAlarm(alarm);
                    }
                }
            });