Lines Matching refs:Timer
34 import com.android.deskclock.data.Timer;
39 import com.android.deskclock.timer.TimerFragment;
40 import com.android.deskclock.timer.TimerService;
399 final List<Timer> timers = DataModel.getDataModel().getTimers();
401 final Timer newestTimer = timers.get(timers.size() - 1);
411 // If no length is supplied, show the timer setup view.
416 // Open DeskClock which is now positioned on the timers tab and show the timer setup.
418 LOGGER.i("Showing timer setup");
422 // Verify that the timer length is between one second and one day.
424 if (lengthMillis < Timer.MIN_LENGTH) {
427 LOGGER.i("Invalid timer length requested: " + lengthMillis);
434 // Attempt to reuse an existing timer that is Reset with the same length and label.
435 Timer timer = null;
436 for (Timer t : DataModel.getDataModel().getTimers()) {
441 timer = t;
445 // Create a new timer if one could not be reused.
446 if (timer == null) {
447 timer = DataModel.getDataModel().addTimer(lengthMillis, label, skipUi);
451 // Start the selected timer.
452 DataModel.getDataModel().startTimer(timer);
456 // If not instructed to skip the UI, display the running timer.
463 .putExtra(TimerService.EXTRA_TIMER_ID, timer.getId()));