Loading src/com/android/deskclock/timer/TimerFragment.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -160,16 +160,21 @@ public class TimerFragment extends DeskClockFragment { intent.removeExtra(HandleDeskClockApiCalls.EXTRA_TIMER_ID); intent.removeExtra(HandleDeskClockApiCalls.EXTRA_TIMER_ID); } } // Either show the view for creating timers or the view of existing timers. // Choose the view to display in this fragment. if (!hasTimers() || createTimer || mTimerSetupState != null) { 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(); showCreateTimerView(); // If initial state of the timer setup view exists, set it now. if (mTimerSetupState != null) { if (mTimerSetupState != null) { mCreateTimerView.setState(mTimerSetupState); mCreateTimerView.setState(mTimerSetupState); mTimerSetupState = null; mTimerSetupState = null; } } } else { } else { // Otherwise, default to showing the list of timers. showTimersView(); showTimersView(); } } Loading src/com/android/deskclock/timer/TimerSetupView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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() { public Serializable getState() { return Arrays.copyOf(mInput, mInput.length); return Arrays.copyOf(mInput, mInput.length); Loading Loading
src/com/android/deskclock/timer/TimerFragment.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -160,16 +160,21 @@ public class TimerFragment extends DeskClockFragment { intent.removeExtra(HandleDeskClockApiCalls.EXTRA_TIMER_ID); intent.removeExtra(HandleDeskClockApiCalls.EXTRA_TIMER_ID); } } // Either show the view for creating timers or the view of existing timers. // Choose the view to display in this fragment. if (!hasTimers() || createTimer || mTimerSetupState != null) { 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(); showCreateTimerView(); // If initial state of the timer setup view exists, set it now. if (mTimerSetupState != null) { if (mTimerSetupState != null) { mCreateTimerView.setState(mTimerSetupState); mCreateTimerView.setState(mTimerSetupState); mTimerSetupState = null; mTimerSetupState = null; } } } else { } else { // Otherwise, default to showing the list of timers. showTimersView(); showTimersView(); } } Loading
src/com/android/deskclock/timer/TimerSetupView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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() { public Serializable getState() { return Arrays.copyOf(mInput, mInput.length); return Arrays.copyOf(mInput, mInput.length); Loading