/packages/apps/DeskClock/src/com/android/deskclock/data/ |
D | TimerModel.java | 41 import com.android.deskclock.timer.TimerKlaxon; 42 import com.android.deskclock.timer.TimerService; 190 for (Timer timer : getMutableTimers()) { in getTimer() 191 if (timer.getId() == timerId) { in getTimer() 192 return timer; in getTimer() 216 Timer timer = new Timer(-1, RESET, length, length, Timer.UNUSED, Timer.UNUSED, length, in addTimer() local 220 timer = TimerDAO.addTimer(mPrefs, timer); in addTimer() 223 getMutableTimers().add(0, timer); in addTimer() 231 timerListener.timerAdded(timer); in addTimer() 234 return timer; in addTimer() [all …]
|
D | TimerDAO.java | 105 static Timer addTimer(SharedPreferences prefs, Timer timer) { in addTimer() argument 118 editor.putInt(STATE + id, timer.getState().getValue()); in addTimer() 119 editor.putLong(LENGTH + id, timer.getLength()); in addTimer() 120 editor.putLong(TOTAL_LENGTH + id, timer.getTotalLength()); in addTimer() 121 editor.putLong(LAST_START_TIME + id, timer.getLastStartTime()); in addTimer() 122 editor.putLong(LAST_WALL_CLOCK_TIME + id, timer.getLastWallClockTime()); in addTimer() 123 editor.putLong(REMAINING_TIME + id, timer.getRemainingTime()); in addTimer() 124 editor.putString(LABEL + id, timer.getLabel()); in addTimer() 125 editor.putBoolean(DELETE_AFTER_USE + id, timer.getDeleteAfterUse()); in addTimer() 130 return new Timer(id, timer.getState(), timer.getLength(), timer.getTotalLength(), in addTimer() [all …]
|
D | TimerNotificationBuilder.java | 38 import com.android.deskclock.timer.ExpiredTimersActivity; 39 import com.android.deskclock.timer.TimerService; 58 final Timer timer = unexpired.get(0); in build() local 62 final boolean running = timer.isRunning(); in build() 65 final long base = getChronometerBase(timer); in build() 74 if (TextUtils.isEmpty(timer.getLabel())) { in build() 77 stateText = timer.getLabel(); in build() 83 .putExtra(TimerService.EXTRA_TIMER_ID, timer.getId()); in build() 93 .putExtra(TimerService.EXTRA_TIMER_ID, timer.getId()); in build() 107 .putExtra(TimerService.EXTRA_TIMER_ID, timer.getId()); in build() [all …]
|
D | DataModel.java | 33 import com.android.deskclock.timer.TimerService; 475 public void removeTimer(Timer timer) { in removeTimer() argument 477 mTimerModel.removeTimer(timer); in removeTimer() 483 public void startTimer(Timer timer) { in startTimer() argument 484 startTimer(null, timer); in startTimer() 491 public void startTimer(Service service, Timer timer) { in startTimer() argument 493 final Timer started = timer.start(); in startTimer() 495 if (timer.getRemainingTime() <= 0) { in startTimer() 507 public void pauseTimer(Timer timer) { in pauseTimer() argument 509 mTimerModel.updateTimer(timer.pause()); in pauseTimer() [all …]
|
D | TimerListener.java | 27 void timerAdded(Timer timer); in timerAdded() argument 38 void timerRemoved(Timer timer); in timerRemoved() argument
|
/packages/apps/DeskClock/src/com/android/deskclock/timer/ |
D | TimerItemFragment.java | 17 package com.android.deskclock.timer; 41 public static TimerItemFragment newInstance(Timer timer) { in newInstance() argument 44 args.putInt(KEY_TIMER_ID, timer.getId()); in newInstance() 59 final Timer timer = getTimer(); in onCreateView() local 60 if (timer == null) { in onCreateView() 68 view.update(timer); in onCreateView() 79 final Timer timer = getTimer(); in updateTime() local 80 view.update(timer); in updateTime() 81 return !timer.isReset(); in updateTime() 98 final Timer timer = getTimer(); in onClick() local [all …]
|
D | ExpiredTimersActivity.java | 15 package com.android.deskclock.timer; 99 for (Timer timer : expiredTimers) { in onCreate() 100 addTimer(timer); in onCreate() 161 private void addTimer(Timer timer) { in addTimer() argument 164 final int timerId = timer.getId(); in addTimer() 174 labelView.setVisibility(TextUtils.isEmpty(timer.getLabel()) ? View.GONE : View.VISIBLE); in addTimer() 181 final Timer timer = DataModel.getDataModel().getTimer(timerId); in addTimer() 182 DataModel.getDataModel().addTimerMinute(timer); in addTimer() 198 private void removeTimer(Timer timer) { in removeTimer() argument 201 final int timerId = timer.getId(); in removeTimer() [all …]
|
D | TimerFragment.java | 17 package com.android.deskclock.timer; 176 final Timer timer = DataModel.getDataModel().getMostRecentExpiredTimer(); in onStart() local 177 showTimerId = timer == null ? -1 : timer.getId(); in onStart() 182 final Timer timer = DataModel.getDataModel().getTimer(showTimerId); in onStart() local 183 if (timer != null) { in onStart() 184 final int index = DataModel.getDataModel().getTimers().indexOf(timer); in onStart() 201 final Timer timer = DataModel.getDataModel().getTimer(showTimerId); in onResume() local 202 if (timer != null) { in onResume() 204 final int index = DataModel.getDataModel().getTimers().indexOf(timer); in onResume() 241 final Timer timer = getTimer(); in updateFab() local [all …]
|
D | TimerService.java | 17 package com.android.deskclock.timer; 73 public static Intent createTimerExpiredIntent(Context context, Timer timer) { in createTimerExpiredIntent() argument 74 final int timerId = timer == null ? -1 : timer.getId(); in createTimerExpiredIntent() 138 final Timer timer = DataModel.getDataModel().getTimer(timerId); in onStartCommand() local 141 if (timer == null) { in onStartCommand() 162 DataModel.getDataModel().startTimer(this, timer); in onStartCommand() 166 DataModel.getDataModel().pauseTimer(timer); in onStartCommand() 170 DataModel.getDataModel().addTimerMinute(timer); in onStartCommand() 173 DataModel.getDataModel().resetOrDeleteTimer(timer, label); in onStartCommand() 177 DataModel.getDataModel().expireTimer(this, timer); in onStartCommand()
|
D | TimerItem.java | 17 package com.android.deskclock.timer; 89 void update(Timer timer) { in update() argument 91 mTimerTextController.setTimeString(timer.getRemainingTime()); in update() 94 final String label = timer.getLabel(); in update() 102 final boolean hideCircle = (timer.isExpired() || timer.isMissed()) && blinkOff; in update() 107 mCircleView.update(timer); in update() 110 if (!timer.isPaused() || !blinkOff || mTimerText.isPressed()) { in update() 117 if (timer.getState() != mLastState) { in update() 118 mLastState = timer.getState(); in update()
|
D | TimerPagerAdapter.java | 17 package com.android.deskclock.timer; 69 final Timer timer = fragment.getTimer(); in getItemPosition() local 71 final int position = getTimers().indexOf(timer); in getItemPosition() 82 final Timer timer = getTimers().get(position); in instantiateItem() local 85 final String tag = getClass().getSimpleName() + timer.getId(); in instantiateItem() 93 fragment = TimerItemFragment.newInstance(timer); in instantiateItem() 101 mFragments.put(timer.getId(), fragment); in instantiateItem() 145 public void timerAdded(Timer timer) { in timerAdded() argument 150 public void timerRemoved(Timer timer) { in timerRemoved() argument
|
D | TimerCircleView.java | 17 package com.android.deskclock.timer; 85 void update(Timer timer) { in update() argument 86 if (mTimer != timer) { in update() 87 mTimer = timer; in update()
|
D | TimerReceiver.java | 17 package com.android.deskclock.timer; 39 final Timer timer = DataModel.getDataModel().getTimer(timerId); in onReceive() local 40 context.startService(TimerService.createTimerExpiredIntent(context, timer)); in onReceive()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/ |
D | ActionServiceImpl.java | 289 final LoggingTimer timer = createLoggingTimer(action, "#executeAction"); in executeAction() local 290 timer.start(); in executeAction() 294 timer.stopAndLog(); in executeAction() 303 final LoggingTimer timer = createLoggingTimer(action, "#processBackgroundResponse"); in processBackgroundResponse() local 304 timer.start(); in processBackgroundResponse() 308 timer.stopAndLog(); in processBackgroundResponse() 315 final LoggingTimer timer = createLoggingTimer(action, "#processBackgroundFailure"); in processBackgroundFailure() local 316 timer.start(); in processBackgroundFailure() 320 timer.stopAndLog(); in processBackgroundFailure()
|
D | BackgroundWorkerService.java | 134 final LoggingTimer timer = new LoggingTimer( in doBackgroundWork() local 136 timer.start(); in doBackgroundWork() 140 timer.stopAndLog(); in doBackgroundWork()
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | LabelDialogFragment.java | 78 public static LabelDialogFragment newInstance(Timer timer) { in newInstance() argument 80 args.putString(ARG_LABEL, timer.getLabel()); in newInstance() 81 args.putInt(ARG_TIMER_ID, timer.getId()); in newInstance() 189 final Timer timer = DataModel.getDataModel().getTimer(mTimerId); in setLabel() local 190 if (timer != null) { in setLabel() 191 DataModel.getDataModel().setTimerLabel(timer, label); in setLabel()
|
D | HandleApiCalls.java | 40 import com.android.deskclock.timer.TimerFragment; 41 import com.android.deskclock.timer.TimerService; 406 for (Timer timer : expiredTimers) { in handleDismissTimer() 407 DataModel.getDataModel().resetOrDeleteTimer(timer, R.string.label_intent); in handleDismissTimer() 480 Timer timer = null; in handleSetTimer() local 486 timer = t; in handleSetTimer() 491 if (timer == null) { in handleSetTimer() 492 timer = DataModel.getDataModel().addTimer(lengthMillis, label, skipUi); in handleSetTimer() 497 DataModel.getDataModel().startTimer(timer); in handleSetTimer() 508 .putExtra(TimerService.EXTRA_TIMER_ID, timer.getId())); in handleSetTimer()
|
/packages/apps/TV/common/src/com/android/tv/common/util/ |
D | Debug.java | 41 DurationTimer timer = new DurationTimer(tag, true); in getTimer() local 42 sTimerMap.put(tag, timer); in getTimer() 43 return timer; in getTimer()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | BatteryUtils.java | 494 final BatteryStats.Timer timer = uid.getForegroundActivityTimer(); in getForegroundActivityTotalTimeUs() local 495 if (timer != null) { in getForegroundActivityTotalTimeUs() 496 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundActivityTotalTimeUs() 504 final BatteryStats.Timer timer = uid.getForegroundServiceTimer(); in getForegroundServiceTotalTimeUs() local 505 if (timer != null) { in getForegroundServiceTotalTimeUs() 506 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundServiceTotalTimeUs()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryUtils.java | 533 final BatteryStats.Timer timer = uid.getForegroundActivityTimer(); in getForegroundActivityTotalTimeUs() local 534 if (timer != null) { in getForegroundActivityTotalTimeUs() 535 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundActivityTotalTimeUs() 543 final BatteryStats.Timer timer = uid.getForegroundServiceTimer(); in getForegroundServiceTotalTimeUs() local 544 if (timer != null) { in getForegroundServiceTotalTimeUs() 545 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundServiceTotalTimeUs()
|
/packages/apps/Contacts/src/com/android/contacts/ |
D | SimImportService.java | 286 final TimingLogger timer = new TimingLogger(TAG, "import"); in doInBackground() local 295 timer.addSplit("done"); in doInBackground() 296 timer.dumpToLog(); in doInBackground()
|
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
D | Throttle.java | 86 int maxTimeout, Clock clock, Timer timer) { in Throttle() argument 93 mTimer = timer; in Throttle()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | ItemDragListener.java | 58 protected ItemDragListener(H dragHost, Timer timer, int springTimeout) { in ItemDragListener() argument 60 mHoverTimer = timer; in ItemDragListener()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | ItemDragListenerTest.java | 206 protected TestDragListener(TestDragHost dragHost, Timer timer, int timeout) { in TestDragListener() argument 207 super(dragHost, timer, timeout); in TestDragListener()
|
/packages/apps/DeskClock/src/com/android/deskclock/controller/ |
D | ShortcutController.java | 73 final ShortcutInfo timer = createNewTimerShortcut(); in updateShortcuts() local 77 Arrays.asList(alarm, timer, stopwatch, screensaver)); in updateShortcuts()
|