diff --git a/src/com/android/deskclock/timer/TimerFragment.java b/src/com/android/deskclock/timer/TimerFragment.java index 35bb732c20f5e741e2de9138bcc90df297ce9a02..357751960b0fae99d9fff2e2190d8b1e4bd9ece0 100644 --- a/src/com/android/deskclock/timer/TimerFragment.java +++ b/src/com/android/deskclock/timer/TimerFragment.java @@ -160,16 +160,21 @@ public class TimerFragment extends DeskClockFragment { intent.removeExtra(HandleDeskClockApiCalls.EXTRA_TIMER_ID); } - // Either show the view for creating timers or the view of existing timers. - if (!hasTimers() || createTimer || mTimerSetupState != null) { + // Choose the view to display in this fragment. + if (showTimerId != -1) { + // A specific timer must be shown; show the list of timers. + showTimersView(); + } else if (!hasTimers() || createTimer || mTimerSetupState != null) { + // No timers exist, a timer is being created, or the last view was timer setup; + // show the timer setup view. showCreateTimerView(); - // If initial state of the timer setup view exists, set it now. if (mTimerSetupState != null) { mCreateTimerView.setState(mTimerSetupState); mTimerSetupState = null; } } else { + // Otherwise, default to showing the list of timers. showTimersView(); } diff --git a/src/com/android/deskclock/timer/TimerSetupView.java b/src/com/android/deskclock/timer/TimerSetupView.java index 150f49648fb991429abd6112944cb11097892759..d8543792452d024e7ff9b8982d27596970d4f7cb 100644 --- a/src/com/android/deskclock/timer/TimerSetupView.java +++ b/src/com/android/deskclock/timer/TimerSetupView.java @@ -201,7 +201,7 @@ public class TimerSetupView extends LinearLayout implements Button.OnClickListen } /** - * @return an opaque representation of the state of timer setup. + * @return an opaque representation of the state of timer setup */ public Serializable getState() { return Arrays.copyOf(mInput, mInput.length);