/packages/apps/DeskClock/src/com/android/deskclock/data/ |
D | TimerModel.java | 52 import static com.android.deskclock.data.Timer.State.EXPIRED; 53 import static com.android.deskclock.data.Timer.State.RESET; 117 private List<Timer> mTimers; 120 private List<Timer> mExpiredTimers; 123 private List<Timer> mMissedTimers; 168 List<Timer> getTimers() { in getTimers() 175 List<Timer> getExpiredTimers() { in getExpiredTimers() 182 private List<Timer> getMissedTimers() { in getMissedTimers() 190 Timer getTimer(int timerId) { in getTimer() 191 for (Timer timer : getMutableTimers()) { in getTimer() [all …]
|
D | Timer.java | 30 import static com.android.deskclock.data.Timer.State.EXPIRED; 31 import static com.android.deskclock.data.Timer.State.MISSED; 32 import static com.android.deskclock.data.Timer.State.PAUSED; 33 import static com.android.deskclock.data.Timer.State.RESET; 34 import static com.android.deskclock.data.Timer.State.RUNNING; 39 public final class Timer { class 108 Timer(int id, State state, long length, long totalLength, long lastStartTime, in Timer() method in Timer 193 Timer start() { in start() 198 return new Timer(mId, RUNNING, mLength, mTotalLength, now(), wallClock(), mRemainingTime, in start() 205 Timer pause() { in pause() [all …]
|
D | TimerModel.kt | 94 private var mTimers: MutableList<Timer>? = null 97 private var mExpiredTimers: MutableList<Timer>? = null 100 private var mMissedTimers: MutableList<Timer>? = null 135 val timers: List<Timer> 141 val expiredTimers: List<Timer> 147 private val missedTimers: List<Timer> 154 fun getTimer(timerId: Int): Timer? { in getTimer() 168 val mostRecentExpiredTimer: Timer? 180 fun addTimer(length: Long, label: String?, deleteAfterUse: Boolean): Timer { in addTimer() 183 Timer(-1, Timer.State.RESET, length, length, Timer.UNUSED, Timer.UNUSED, length, in addTimer() [all …]
|
D | Timer.kt | 32 class Timer internal constructor( in <lambda>() class 139 fun start(): Timer { in <lambda>() 143 Timer(id, State.RUNNING, length, totalLength, in <lambda>() 151 fun pause(): Timer { in <lambda>() 159 return Timer(id, State.PAUSED, length, totalLength, UNUSED, UNUSED, remainingTime, label, in <lambda>() 166 fun expire(): Timer { in <lambda>() 172 return Timer(id, State.EXPIRED, length, 0L, Utils.now(), in <lambda>() 179 fun miss(): Timer { in <lambda>() 185 return Timer(id, State.MISSED, length, 0L, Utils.now(), in <lambda>() 192 fun reset(): Timer { in <lambda>() [all …]
|
D | TimerDAO.kt | 60 fun getTimers(prefs: SharedPreferences): MutableList<Timer> { in getTimers() 63 val timers: MutableList<Timer> = ArrayList(timerIds.size) in getTimers() 68 val stateValue: Int = prefs.getInt(STATE + id, Timer.State.RESET.value) in getTimers() 69 val state: Timer.State? = Timer.State.fromValue(stateValue) in getTimers() 76 val lastStartTime: Long = prefs.getLong(LAST_START_TIME + id, Timer.UNUSED) in getTimers() 77 val lastWallClockTime: Long = prefs.getLong(LAST_WALL_CLOCK_TIME + id, Timer.UNUSED) in getTimers() 81 timers.add(Timer(id, it, length, totalLength, lastStartTime, in getTimers() 93 fun addTimer(prefs: SharedPreferences, timer: Timer): Timer { in addTimer() 118 return Timer(id, timer.state, timer.length, timer.totalLength, in addTimer() 127 fun updateTimer(prefs: SharedPreferences, timer: Timer) { in updateTimer() [all …]
|
D | DataModel.java | 432 public List<Timer> getTimers() { in getTimers() 440 public List<Timer> getExpiredTimers() { in getExpiredTimers() 449 public Timer getTimer(int timerId) { in getTimer() 458 public Timer getMostRecentExpiredTimer() { in getMostRecentExpiredTimer() 469 public Timer addTimer(long length, String label, boolean deleteAfterUse) { in addTimer() 477 public void removeTimer(Timer timer) { in removeTimer() 485 public void startTimer(Timer timer) { in startTimer() 493 public void startTimer(Service service, Timer timer) { in startTimer() 495 final Timer started = timer.start(); in startTimer() 509 public void pauseTimer(Timer timer) { in pauseTimer() [all …]
|
D | TimerDAO.java | 21 import com.android.deskclock.data.Timer.State; 29 import static com.android.deskclock.data.Timer.State.RESET; 72 static List<Timer> getTimers(SharedPreferences prefs) { in getTimers() 75 final List<Timer> timers = new ArrayList<>(timerIds.size()); in getTimers() 88 final long lastStartTime = prefs.getLong(LAST_START_TIME + id, Timer.UNUSED); in getTimers() 90 Timer.UNUSED); in getTimers() 94 timers.add(new Timer(id, state, length, totalLength, lastStartTime, in getTimers() 105 static Timer addTimer(SharedPreferences prefs, Timer timer) { in addTimer() 130 return new Timer(id, timer.getState(), timer.getLength(), timer.getTotalLength(), in addTimer() 138 static void updateTimer(SharedPreferences prefs, Timer timer) { in updateTimer() [all …]
|
D | DataModel.kt | 417 val timers: List<Timer> 426 val expiredTimers: List<Timer> 436 fun getTimer(timerId: Int): Timer? { in getTimer() 445 val mostRecentExpiredTimer: Timer? 457 fun addTimer(length: Long, label: String?, deleteAfterUse: Boolean): Timer { in addTimer() 465 fun removeTimer(timer: Timer) { in removeTimer() 473 fun startTimer(timer: Timer) { in startTimer() 481 fun startTimer(service: Service?, timer: Timer) { in startTimer() 497 fun pauseTimer(timer: Timer) { in pauseTimer() 506 fun expireTimer(service: Service?, timer: Timer) { in expireTimer() [all …]
|
D | TimerListener.kt | 26 fun timerAdded(timer: Timer) 32 fun timerUpdated(before: Timer, after: Timer) 37 fun timerRemoved(timer: Timer)
|
D | TimerListener.java | 27 void timerAdded(Timer timer); in timerAdded() 33 void timerUpdated(Timer before, Timer after); in timerUpdated() 38 void timerRemoved(Timer timer); in timerRemoved()
|
D | TimerNotificationBuilder.java | 63 public Notification build(Context context, NotificationModel nm, List<Timer> unexpired) { in build() 64 final Timer timer = unexpired.get(0); in build() 221 Notification buildHeadsUp(Context context, List<Timer> expired) { in buildHeadsUp() 222 final Timer timer = expired.get(0); in buildHeadsUp() 305 List<Timer> missedTimers) { in buildMissed() 306 final Timer timer = missedTimers.get(0); in buildMissed() 389 private static long getChronometerBase(Timer timer) { in getChronometerBase()
|
/packages/apps/DeskClock/tests/src/com/android/deskclock/timer/ |
D | TimerFragmentTest.java | 37 import com.android.deskclock.data.Timer; 146 final List<Timer> timers = new ArrayList<>(DataModel.getDataModel().getTimers()); in clearTimers() 147 for (Timer timer : timers) { in clearTimers() 185 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsTimer() 187 assertStateEquals(Timer.State.RUNNING, 0); in timeClick_startsTimer() 197 assertStateEquals(Timer.State.RESET, 1); in timeClick_startsSecondTimer() 198 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsSecondTimer() 200 assertStateEquals(Timer.State.RUNNING, 1); in timeClick_startsSecondTimer() 201 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsSecondTimer() 211 assertStateEquals(Timer.State.RESET, 0); in timeClick_pausesTimer() [all …]
|
D | TimerServiceTest.java | 27 import com.android.deskclock.data.Timer; 63 final List<Timer> timers = new ArrayList<>(DataModel.getDataModel().getTimers()); in clearTimers() 64 for (Timer timer : timers) { in clearTimers() 74 Timer timer1 = dataModel.addTimer(60000L, null, false); in verifyIntentsHonored_whileTimersFire() 75 Timer timer2 = dataModel.addTimer(60000L, null, false); in verifyIntentsHonored_whileTimersFire() 111 Timer timer = dataModel.addTimer(60000L, null, false); in verifyIntentsHonored_ifNoTimersAreExpired()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | FakeUid.java | 21 import android.os.BatteryStats.Timer; 49 public Timer getAggregatedPartialWakelockTimer() { in getAggregatedPartialWakelockTimer() 54 public Timer getMulticastWakelockStats() { in getMulticastWakelockStats() 59 public ArrayMap<String, ? extends Timer> getSyncStats() { in getSyncStats() 64 public ArrayMap<String, ? extends Timer> getJobStats() { in getJobStats() 162 public Timer getWifiScanTimer() { in getWifiScanTimer() 182 public Timer getWifiScanBackgroundTimer() { in getWifiScanBackgroundTimer() 202 public Timer getAudioTurnedOnTimer() { in getAudioTurnedOnTimer() 207 public Timer getVideoTurnedOnTimer() { in getVideoTurnedOnTimer() 212 public Timer getFlashlightTurnedOnTimer() { in getFlashlightTurnedOnTimer() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | FakeUid.java | 21 import android.os.BatteryStats.Timer; 49 public Timer getAggregatedPartialWakelockTimer() { in getAggregatedPartialWakelockTimer() 54 public Timer getMulticastWakelockStats() { in getMulticastWakelockStats() 59 public ArrayMap<String, ? extends Timer> getSyncStats() { in getSyncStats() 64 public ArrayMap<String, ? extends Timer> getJobStats() { in getJobStats() 162 public Timer getWifiScanTimer() { in getWifiScanTimer() 182 public Timer getWifiScanBackgroundTimer() { in getWifiScanBackgroundTimer() 202 public Timer getAudioTurnedOnTimer() { in getAudioTurnedOnTimer() 207 public Timer getVideoTurnedOnTimer() { in getVideoTurnedOnTimer() 212 public Timer getFlashlightTurnedOnTimer() { in getFlashlightTurnedOnTimer() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/timer/ |
D | ExpiredTimersActivity.java | 37 import com.android.deskclock.data.Timer; 65 final List<Timer> expiredTimers = getExpiredTimers(); in onCreate() 99 for (Timer timer : expiredTimers) { in onCreate() 161 private void addTimer(Timer timer) { in addTimer() 181 final Timer timer = DataModel.getDataModel().getTimer(timerId); in addTimer() 187 final List<Timer> expiredTimers = getExpiredTimers(); in addTimer() 198 private void removeTimer(Timer timer) { in removeTimer() 212 final List<Timer> expiredTimers = getExpiredTimers(); in removeTimer() 240 private List<Timer> getExpiredTimers() { in getExpiredTimers() 255 final Timer timer = DataModel.getDataModel().getTimer(timerItem.getId()); in run() [all …]
|
D | TimerFragment.kt | 40 import com.android.deskclock.data.Timer 154 val timer: Timer? = DataModel.dataModel.mostRecentExpiredTimer in onStart() 160 val timer: Timer? = DataModel.dataModel.getTimer(showTimerId) in onStart() 178 val timer: Timer? = DataModel.dataModel.getTimer(showTimerId) in onResume() 223 Timer.State.RUNNING -> { in updateFab() 231 Timer.State.RESET -> { in updateFab() 239 Timer.State.PAUSED -> { in updateFab() 247 Timer.State.MISSED, Timer.State.EXPIRED -> { in updateFab() 306 Timer.State.RUNNING -> { in onFabClick() 314 Timer.State.PAUSED, Timer.State.RESET -> { in onFabClick() [all …]
|
D | TimerPagerAdapter.java | 30 import com.android.deskclock.data.Timer; 69 final Timer timer = fragment.getTimer(); in getItemPosition() 82 final Timer timer = getTimers().get(position); in instantiateItem() 148 public void timerAdded(Timer timer) { in timerAdded() 153 public void timerRemoved(Timer timer) { in timerRemoved() 158 public void timerUpdated(Timer before, Timer after) { in timerUpdated() 176 Timer getTimer(int index) { in getTimer() 180 private List<Timer> getTimers() { in getTimers()
|
D | ExpiredTimersActivity.kt | 36 import com.android.deskclock.data.Timer 152 private fun addTimer(timer: Timer) { in addTimer() 170 val timer: Timer = DataModel.dataModel.getTimer(timerId)!! in addTimer() 186 private fun removeTimer(timer: Timer) { in removeTimer() 226 private val expiredTimers: List<Timer> 239 val timer: Timer? = DataModel.dataModel.getTimer(timerItem.id) in run() 269 override fun timerAdded(timer: Timer) { in timerAdded() 275 override fun timerUpdated(before: Timer, after: Timer) { in timerUpdated() 283 override fun timerRemoved(timer: Timer) { in timerRemoved()
|
D | TimerItem.kt | 35 import com.android.deskclock.data.Timer 60 private var mLastState: Timer.State? = null 82 fun update(timer: Timer) { in update() 114 Timer.State.RESET, Timer.State.PAUSED -> { in update() 123 Timer.State.RUNNING -> { in update() 133 Timer.State.EXPIRED, Timer.State.MISSED -> { in update()
|
D | TimerPagerAdapter.kt | 30 import com.android.deskclock.data.Timer 132 override fun timerAdded(timer: Timer) { in timerAdded() 136 override fun timerRemoved(timer: Timer) { in timerRemoved() 140 override fun timerUpdated(before: Timer, after: Timer) { in timerUpdated() 156 fun getTimer(index: Int): Timer { in getTimer() 160 private val timers: List<Timer>
|
D | TimerItemFragment.java | 29 import com.android.deskclock.data.Timer; 41 public static TimerItemFragment newInstance(Timer timer) { in newInstance() 59 final Timer timer = getTimer(); in onCreateView() 79 final Timer timer = getTimer(); in updateTime() 91 Timer getTimer() { in getTimer() 98 final Timer timer = getTimer(); in onClick() 128 final Timer clickedTimer = getTimer(); in onClick()
|
D | TimerFragment.java | 46 import com.android.deskclock.data.Timer; 176 final Timer timer = DataModel.getDataModel().getMostRecentExpiredTimer(); in onStart() 182 final Timer timer = DataModel.getDataModel().getTimer(showTimerId); in onStart() 201 final Timer timer = DataModel.getDataModel().getTimer(showTimerId); in onResume() 241 final Timer timer = getTimer(); in updateFab() 331 final Timer timer = getTimer(); in onFabClick() 370 final Timer timer = DataModel.getDataModel().addTimer(timerLength, "", false); in onFabClick() 392 final Timer timer = getTimer(); in onLeftButtonClick() 549 private void animateTimerRemove(final Timer timerToRemove) { in animateTimerRemove() 578 private void animateToView(final View toView, final Timer timerToRemove, in animateToView() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | ItemDragListener.java | 29 import java.util.Timer; 46 private final Timer mHoverTimer; 50 this(dragHost, new Timer(), DEFAULT_SPRING_TIMEOUT); in ItemDragListener() 54 this(dragHost, new Timer(), springTimeout); in ItemDragListener() 58 protected ItemDragListener(H dragHost, Timer timer, int springTimeout) { in ItemDragListener()
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | HandleApiCalls.java | 35 import com.android.deskclock.data.Timer; 392 final Timer selectedTimer = getSelectedTimer(dataUri); in handleDismissTimer() 404 final List<Timer> expiredTimers = DataModel.getDataModel().getExpiredTimers(); in handleDismissTimer() 406 for (Timer timer : expiredTimers) { in handleDismissTimer() 422 private Timer getSelectedTimer(Uri dataUri) { in getSelectedTimer() 444 final List<Timer> timers = DataModel.getDataModel().getTimers(); in handleShowTimers() 446 final Timer newestTimer = timers.get(timers.size() - 1); in handleShowTimers() 469 if (lengthMillis < Timer.MIN_LENGTH) { in handleSetTimer() 480 Timer timer = null; in handleSetTimer() 481 for (Timer t : DataModel.getDataModel().getTimers()) { in handleSetTimer()
|