OSDN Git Service

Have "Revert" go back to the original state of the alarm.
authorPatrick Scott <phanna@android.com>
Wed, 3 Mar 2010 15:23:16 +0000 (10:23 -0500)
committerPatrick Scott <phanna@android.com>
Wed, 3 Mar 2010 15:23:16 +0000 (10:23 -0500)
commit6064d3f7aabcb073dc3f917e049bc04c67fb6b29
tree6812190a1bdcbb4f8e44166b57f56deca4e28e7d
parent43adf9b9cbfede7236918de3f1e89bfbaafedbb1
Have "Revert" go back to the original state of the alarm.

Keep the original alarm state so that revert will reload the preferences from
the original state. Have all preferences immediately take effect. When adding a
new alarm, add the alarm if preferences change and then delete the alarm when
reverting.

Pop the set alarm toast only when changing the time or the enabled setting and
the result is that the alarm is enabled. Otherwise there can be a lot of toasts
showing while editing an alarm.
res/layout/set_alarm.xml
src/com/android/deskclock/Alarm.java
src/com/android/deskclock/Alarms.java
src/com/android/deskclock/RepeatPreference.java
src/com/android/deskclock/SetAlarm.java