Searched refs:timer (Results 1 - 25 of 33) sorted by relevance

12

/packages/apps/DeskClock/src/com/android/deskclock/data/
H A DTimerListener.java25 * @param timer the timer that was added
27 void timerAdded(Timer timer); argument
30 * @param before the timer state before the update
31 * @param after the timer state after the update
36 * @param timer the timer that was removed
38 void timerRemoved(Timer timer); argument
H A DTimerModel.java41 import com.android.deskclock.timer.TimerKlaxon;
42 import com.android.deskclock.timer.TimerService;
84 /** Update timer notification when locale changes. */
95 /** The listeners to notify when a timer is added, updated or removed. */
98 /** Delegate that builds platform-specific timer notifications. */
103 * ids in this collection. If a timer was already expired when the app was started its id will
125 * The service that keeps this application in the foreground while a heads-up timer
145 // Update timer notification when locale changes.
186 * @param timerId identifies the timer to return
187 * @return the timer wit
241 expireTimer(Service service, Timer timer) argument
258 updateTimer(Timer timer) argument
275 removeTimer(Timer timer) argument
297 resetTimer(Timer timer, boolean allowDelete, @StringRes int eventLabelId) argument
518 doUpdateTimer(Timer timer) argument
564 doRemoveTimer(Timer timer) argument
615 doResetOrDeleteTimer(Timer timer, boolean allowDelete, @StringRes int eventLabelId) argument
642 doUpdateAfterRebootTimer(Timer timer) argument
650 doUpdateAfterTimeSetTimer(Timer timer) argument
[all...]
H A DTimerDAO.java37 /** Key to a preference that stores the set of timer ids. */
40 /** Key to a preference that stores the id to assign to the next timer. */
43 /** Prefix for a key to a preference that stores the state of the timer. */
46 /** Prefix for a key to a preference that stores the original timer length at creation. */
49 /** Prefix for a key to a preference that stores the total timer length with additions. */
52 /** Prefix for a key to a preference that stores the last start time of the timer. */
55 /** Prefix for a key to a preference that stores the epoch time when the timer last started. */
61 /** Prefix for a key to a preference that stores the label of the timer. */
64 /** Prefix for a key to a preference that signals the timer should be deleted on first reset. */
73 // Read the set of timer id
105 addTimer(SharedPreferences prefs, Timer timer) argument
138 updateTimer(SharedPreferences prefs, Timer timer) argument
158 removeTimer(SharedPreferences prefs, Timer timer) argument
[all...]
H A DTimerNotificationBuilder.java38 import com.android.deskclock.timer.ExpiredTimersActivity;
39 import com.android.deskclock.timer.TimerService;
58 final Timer timer = unexpired.get(0);
62 final boolean running = timer.isRunning();
65 final long base = getChronometerBase(timer);
73 // Single timer is running.
74 if (TextUtils.isEmpty(timer.getLabel())) {
77 stateText = timer.getLabel();
83 .putExtra(TimerService.EXTRA_TIMER_ID, timer.getId());
93 .putExtra(TimerService.EXTRA_TIMER_ID, timer
377 getChronometerBase(Timer timer) argument
[all...]
H A DDataModel.java33 import com.android.deskclock.timer.TimerService;
173 /** The model from which timer data are fetched. */
444 * @param timerId identifies the timer to return
445 * @return the timer with the given {@code timerId}
453 * @return the timer that last expired and is still expired now; {@code null} if no timers are
462 * @param length the length of the timer in milliseconds
463 * @param label describes the purpose of the timer
464 * @param deleteAfterUse {@code true} indicates the timer should be deleted when it is reset
465 * @return the newly added timer
473 * @param timer th
475 removeTimer(Timer timer) argument
483 startTimer(Timer timer) argument
491 startTimer(Service service, Timer timer) argument
507 pauseTimer(Timer timer) argument
516 expireTimer(Service service, Timer timer) argument
525 resetTimer(Timer timer) argument
539 resetOrDeleteTimer(Timer timer, @StringRes int eventLabelId) argument
577 addTimerMinute(Timer timer) argument
586 setTimerLabel(Timer timer, String label) argument
595 setTimerLength(Timer timer, long length) argument
604 setRemainingTime(Timer timer, long remainingTime) argument
[all...]
/packages/apps/TV/src/com/android/tv/util/
H A DDebug.java43 * Returns the global duration timer by tag.
49 DurationTimer timer = new DurationTimer(tag, true);
50 sTimerMap.put(tag, timer);
51 return timer;
55 * Removes the global duration timer by tag.
/packages/apps/DeskClock/src/com/android/deskclock/timer/
H A DTimerItemFragment.java17 package com.android.deskclock.timer;
41 public static TimerItemFragment newInstance(Timer timer) { argument
44 args.putInt(KEY_TIMER_ID, timer.getId());
59 final Timer timer = getTimer();
60 if (timer == null) {
68 view.update(timer);
74 * @return {@code true} iff the timer is in a state that requires continuous updates
79 final Timer timer = getTimer();
80 view.update(timer);
81 return !timer
[all...]
H A DExpiredTimersActivity.java15 package com.android.deskclock.timer;
44 * timers and a single button to reset them all. Each expired timer can also be reset to one minute
45 * with a button in the user interface. All other timer operations are disabled in this activity.
99 for (Timer timer : expiredTimers) {
100 addTimer(timer);
103 // Update views in response to timer data changes.
158 * Create and add a new view that corresponds with the given {@code timer}.
160 private void addTimer(Timer timer) { argument
163 final int timerId = timer.getId();
166 // Store the timer i
197 removeTimer(Timer timer) argument
286 timerAdded(Timer timer) argument
302 timerRemoved(Timer timer) argument
[all...]
H A DTimerReceiver.java17 package com.android.deskclock.timer;
28 * This broadcast receiver exists to handle timer expiry scheduled in 4.2.1 and prior. It must exist
30 * beyond 4.2.1. After 4.2.1, all timer expiration is directed to TimerService.
35 LogUtils.e("TimerReceiver", "Received legacy timer broadcast: %s", intent.getAction());
38 final int timerId = intent.getIntExtra("timer.intent.extra", -1);
39 final Timer timer = DataModel.getDataModel().getTimer(timerId);
40 context.startService(TimerService.createTimerExpiredIntent(context, timer));
H A DTimerService.java17 package com.android.deskclock.timer;
34 * <p>This service exists solely to allow {@link android.app.AlarmManager} and timer notifications
48 /** Shows the tab with timers; scrolls to a specific timer. */
52 /** Starts the sole timer. */
54 /** Resets the timer. */
56 /** Adds an extra minute to the timer. */
59 /** Extra for many actions specific to a given timer. */
73 public static Intent createTimerExpiredIntent(Context context, Timer timer) { argument
74 final int timerId = timer == null ? -1 : timer
[all...]
H A DTimerItem.java17 package com.android.deskclock.timer;
46 /** Formats and displays the text in the timer. */
49 /** Displays timer progress as a color circle that changes from white to red. */
52 /** A button that either resets the timer or adds time to it, depending on its state. */
55 /** Displays the label associated with the timer. Tapping it presents an edit dialog. */
58 /** The last state of the timer that was rendered; used to avoid expensive operations. */
87 * Updates this view to display the latest state of the {@code timer}.
89 void update(Timer timer) { argument
91 mTimerTextController.setTimeString(timer.getRemainingTime());
94 final String label = timer
[all...]
H A DTimerPagerAdapter.java17 package com.android.deskclock.timer;
37 * This adapter produces a {@link TimerItemFragment} for each timer.
43 /** Maps each timer id to the corresponding {@link TimerItemFragment} that draws it. */
69 final Timer timer = fragment.getTimer();
71 final int position = getTimers().indexOf(timer);
82 final Timer timer = getTimers().get(position);
85 final String tag = getClass().getSimpleName() + timer.getId();
93 fragment = TimerItemFragment.newInstance(timer);
101 mFragments.put(timer.getId(), fragment);
145 public void timerAdded(Timer timer) { argument
150 timerRemoved(Timer timer) argument
[all...]
H A DTimerFragment.java17 package com.android.deskclock.timer;
71 /** Notified when the user swipes vertically to change the visible timer. */
89 /** {@code true} while this fragment is creating a new timer; {@code false} otherwise. */
93 * @return an Intent that selects the timers tab with the setup screen for a new timer in place.
127 // If timer setup state is present, retrieve it to be later honored.
158 // A specific timer must be shown; show the list of timers.
161 // No timers exist, a timer is being created, or the last view was timer setup;
162 // show the timer setup view.
174 // If the intent did not specify a timer t
747 timerAdded(Timer timer) argument
781 timerRemoved(Timer timer) argument
[all...]
H A DTimerCircleView.java17 package com.android.deskclock.timer;
34 * Custom view that draws timer progress as a circle.
38 /** The size of the dot indicating the progress through the timer. */
44 /** The color indicating the remaining portion of the timer. */
47 /** The color indicating the completed portion of the timer. */
50 /** The size of the stroke that paints the timer circle. */
85 void update(Timer timer) { argument
86 if (mTimer != timer) {
87 mTimer = timer;
107 // If the timer i
[all...]
H A DTimerKlaxon.java17 package com.android.deskclock.timer;
32 * Manages playing the timer ringtone and vibrating the device.
58 // Look up user-selected timer ringtone.
61 LogUtils.i("Playing silent ringtone for timer");
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/
H A DWakeLockAnomalyDetector.java113 BatteryStats.Timer timer = uid.getAggregatedPartialWakelockTimer();
115 return timer != null ? timer.getCurrentDurationMsLocked(elapsedRealtimeMs) : 0;
120 BatteryStats.Timer timer = uid.getAggregatedPartialWakelockTimer();
121 BatteryStats.Timer subTimer = timer != null ? timer.getSubTimer() : null;
H A DBluetoothScanAnomalyDetector.java110 BatteryStats.Timer timer = uid.getBluetoothUnoptimizedScanBackgroundTimer();
112 return timer != null ? timer.getTotalDurationMsLocked(elapsedRealtimeMs) : 0;
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/
H A DActionServiceImpl.java302 final LoggingTimer timer = createLoggingTimer(action, "#executeAction");
303 timer.start();
307 timer.stopAndLog();
316 final LoggingTimer timer = createLoggingTimer(action, "#processBackgroundResponse");
317 timer.start();
321 timer.stopAndLog();
328 final LoggingTimer timer = createLoggingTimer(action, "#processBackgroundFailure");
329 timer.start();
333 timer.stopAndLog();
H A DBackgroundWorkerService.java142 final LoggingTimer timer = new LoggingTimer(
144 timer.start();
148 timer.stopAndLog();
/packages/apps/DeskClock/src/com/android/deskclock/
H A DLabelDialogFragment.java78 public static LabelDialogFragment newInstance(Timer timer) { argument
80 args.putString(ARG_LABEL, timer.getLabel());
81 args.putInt(ARG_TIMER_ID, timer.getId());
177 * Sets the new label into the timer or alarm.
189 final Timer timer = DataModel.getDataModel().getTimer(mTimerId);
190 if (timer != null) {
191 DataModel.getDataModel().setTimerLabel(timer, label);
H A DHandleApiCalls.java39 import com.android.deskclock.timer.TimerFragment;
40 import com.android.deskclock.timer.TimerService;
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.
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;
441 timer
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
H A DThrottle.java86 int maxTimeout, Clock clock, Timer timer) {
93 mTimer = timer;
85 Throttle(String name, Runnable callback, Handler handler,int minTimeout, int maxTimeout, Clock clock, Timer timer) argument
/packages/apps/Settings/src/com/android/settings/fuelgauge/
H A DBatteryUtils.java397 final BatteryStats.Timer timer = uid.getForegroundActivityTimer();
398 if (timer != null) {
399 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED);
407 final BatteryStats.Timer timer = uid.getForegroundServiceTimer();
408 if (timer != null) {
409 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED);
/packages/apps/DocumentsUI/src/com/android/documentsui/
H A DItemDragListener.java58 protected ItemDragListener(H dragHost, Timer timer, int springTimeout) { argument
60 mHoverTimer = timer;
/packages/apps/Contacts/src/com/android/contacts/
H A DSimImportService.java286 final TimingLogger timer = new TimingLogger(TAG, "import");
295 timer.addSplit("done");
296 timer.dumpToLog();

Completed in 310 milliseconds

12