Home
last modified time | relevance | path

Searched refs:mClock (Results 1 – 25 of 32) sorted by relevance

12

/packages/apps/Email/tests/src/com/android/email/
DThrottleTest.java39 private final MockClock mClock = new MockClock(); field in ThrottleTest
40 private final MockTimer mTimer = new MockTimer(mClock);
43 MIN_TIMEOUT, MAX_TIMEOUT, mClock, mTimer);
49 mClock.advance(milliseconds); in advanceClock()
129 mClock.advance(10);
134 mClock.advance(Throttle.TIMEOUT_EXTEND_INTERVAL);
139 mClock.advance(Throttle.TIMEOUT_EXTEND_INTERVAL);
144 mClock.advance(Throttle.TIMEOUT_EXTEND_INTERVAL + 1);
178 private final Clock mClock;
188 mClock = clock;
[all …]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DStorageManagerUpsellDialogTest.java36 @Mock private StorageManagerUpsellDialog.Clock mClock; field in StorageManagerUpsellDialogTest
43 fragment.setClock(mClock); in testNoThanksMaximumShownTimes()
50 when(mClock.currentTimeMillis()).thenReturn(TimeUnit.DAYS.toMillis(90 * 2)); in testNoThanksMaximumShownTimes()
56 when(mClock.currentTimeMillis()).thenReturn(TimeUnit.DAYS.toMillis(90 * 3)); in testNoThanksMaximumShownTimes()
62 when(mClock.currentTimeMillis()).thenReturn(TimeUnit.DAYS.toMillis(90 * 4)); in testNoThanksMaximumShownTimes()
68 when(mClock.currentTimeMillis()).thenReturn(TimeUnit.DAYS.toMillis(90 * 5)); in testNoThanksMaximumShownTimes()
DAppsAsyncLoaderTest.java67 @Mock private AppsAsyncLoader.Clock mClock; field in AppsAsyncLoaderTest
87 when(mClock.getCurrentTime()).thenReturn(STARTING_TIME); in setUp()
112 mLoader.mClock = mClock; in setUp()
/packages/apps/Camera2/src/com/android/camera/ui/motion/
DDynamicAnimator.java35 private final AnimationClock mClock; field in DynamicAnimator
44 mClock = clock; in DynamicAnimator()
51 mDrawTimeMillis = mClock.getTimeMillis(); in draw()
90 mLastDrawTimeMillis = mClock.getTimeMillis(); in invalidate()
114 return mClock.getTimeMillis(); in getTimeMillis()
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
DNotificationControllerTest.java54 private FakeClock mClock; field in NotificationControllerTest
62 mClock = new FakeClock(); in setUp()
63 mController.setClock(mClock); in setUp()
88 mClock.time += TimeUnit.DAYS.toMillis(91); in testNotificationNotShownIfShownTooManyTimes()
108 mClock.time += TimeUnit.DAYS.toMillis(14); in testNotificationNotShownIfDismissedTooManyTimes()
134 mClock.time = TimeUnit.DAYS.toMillis(14); in testDismissNotificationDelay()
156 mClock.time = TimeUnit.DAYS.toMillis(90); in testNoThanksNotificationDelay()
/packages/apps/TV/src/com/android/tv/dvr/recorder/
DRecordingScheduler.java82 private final Clock mClock; field in RecordingScheduler
156 mClock = clock; in RecordingScheduler()
200 mClock.currentTimeMillis() + SOON_DURATION_IN_MS), in updatePendingRecordings()
210 || (mLastStartTimePendingMs > mClock.currentTimeMillis() in updatePendingRecordings()
212 < mClock.currentTimeMillis() + SOON_DURATION_IN_MS); in updatePendingRecordings()
308 mClock); in scheduleRecordingSoon()
320 Math.max(mLastStartTimePendingMs, mClock.currentTimeMillis())); in updateNextAlarm()
335 return mClock.currentTimeMillis() >= scheduledRecording.getStartTimeMs() - durationInMs; in startsWithin()
DInputTaskScheduler.java107 private final Clock mClock; field in InputTaskScheduler
157 mClock = clock; in InputTaskScheduler()
178 mClock); in InputTaskScheduler()
228 if (schedule.getStartTimeMs() > mClock.currentTimeMillis() in handleUpdateSchedule()
274 long currentTimeMs = mClock.currentTimeMillis(); in handleBuildSchedule()
360 schedule, channel, mDvrManager, mSessionManager, mDataManager, mClock); in createRecordingTask()
DScheduledProgramReaper.java33 private final Clock mClock; field in ScheduledProgramReaper
37 mClock = clock; in ScheduledProgramReaper()
43 long cutoff = mClock.currentTimeMillis() - TimeUnit.DAYS.toMillis(DAYS); in run()
DRecordingTask.java130 private final Clock mClock; field in RecordingTask
148 mClock = clock; in RecordingTask()
247 > mClock.currentTimeMillis()) { in onRecordingStopped()
313 if (mScheduledRecording.getEndTimeMs() < mClock.currentTimeMillis()) { in handleInit()
377 < mClock.currentTimeMillis()) { in handleStartRecording()
443 long now = mClock.currentTimeMillis(); in sendEmptyMessageAtAbsoluteTime()
/packages/apps/StorageManager/src/com/android/storagemanager/automatic/
DAutomaticStorageManagementJobService.java47 private Clock mClock; field in AutomaticStorageManagementJobService
166 if (mClock == null) { in getClock()
167 mClock = new Clock(); in getClock()
169 return mClock; in getClock()
174 mClock = clock; in setClock()
DNotificationController.java95 private Clock mClock; field in NotificationController
138 mClock = clock; in setClock()
282 if (mClock == null) { in getCurrentTime()
283 mClock = new Clock(); in getCurrentTime()
286 return mClock.currentTimeMillis(); in getCurrentTime()
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
DStorageManagerUpsellDialog.java56 private Clock mClock; field in StorageManagerUpsellDialog
68 mClock = clock; in setClock()
159 if (mClock == null) { in getCurrentTime()
160 mClock = new Clock(); in getCurrentTime()
163 return mClock.currentTimeMillis(); in getCurrentTime()
DAppStateUsageStatsBridge.java57 protected Clock mClock; field in AppStateUsageStatsBridge
65 mClock = new Clock(); in AppStateUsageStatsBridge()
102 long days = (TimeUnit.MILLISECONDS.toDays(mClock.getCurrentTime() - lastUsed)); in getDaysSinceLastUse()
120 return (TimeUnit.MILLISECONDS.toDays(mClock.getCurrentTime() - pi.firstInstallTime)); in getDaysSinceInstalled()
124 long now = mClock.getCurrentTime(); in getAggregatedUsageStats()
DAppsAsyncLoader.java67 protected Clock mClock; field in AppsAsyncLoader
90 mClock = new Clock(); in AppsAsyncLoader()
102 long now = mClock.getCurrentTime(); in loadApps()
391 long days = (TimeUnit.MILLISECONDS.toDays(mClock.getCurrentTime() - lastUsed)); in getDaysSinceLastUse()
409 return (TimeUnit.MILLISECONDS.toDays(mClock.getCurrentTime() - pi.firstInstallTime)); in getDaysSinceInstalled()
/packages/modules/NetworkStack/src/android/net/dhcp/
DDhcpLeaseRepository.java68 private final Clock mClock; field in DhcpLeaseRepository
126 mClock = clock; in DhcpLeaseRepository()
170 final long currentTime = mClock.elapsedRealtime(); in getOffer()
241 final long currentTime = mClock.elapsedRealtime(); in requestLease()
341 final long expTime = mClock.elapsedRealtime() + mLeaseTimeMs; in markLeaseDeclined()
352 removeExpiredLeases(mClock.elapsedRealtime()); in getCommittedLeases()
361 removeExpiredLeases(mClock.elapsedRealtime()); in getDeclinedAddresses()
/packages/apps/TV/src/com/android/tv/data/
DProgramDataManager.java95 private final Clock mClock; field in ProgramDataManager
154 mClock = time; in ProgramDataManager()
266 mClock.currentTimeMillis() - PROGRAM_GUIDE_SNAP_TIME_MS, in prefetchChannel()
419 delayedTime = program.getEndTimeUtcMillis() - mClock.currentTimeMillis(); in updateCurrentProgram()
486 mProgramsUpdateTask = new ProgramsUpdateTask(mClock.currentTimeMillis()); in handleUpdateCurrentPrograms()
500 long time = mClock.currentTimeMillis(); in ProgramsPrefetchTask()
624 long currentTime = mClock.currentTimeMillis(); in onPostExecute()
844 channelId, mClock.currentTimeMillis()); in handleMessage()
862 - mClock.currentTimeMillis(); in handleMessage()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/storage/
DCachedStorageValuesHelper.java54 protected Clock mClock; field in CachedStorageValuesHelper
59 mClock = new Clock(); in CachedStorageValuesHelper()
152 .putLong(TIMESTAMP_KEY, mClock.getCurrentTime()) in cacheResult()
163 final long currentTime = mClock.getCurrentTime(); in isDataValid()
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/
DCachedStorageValuesHelper.java54 protected Clock mClock; field in CachedStorageValuesHelper
59 mClock = new Clock(); in CachedStorageValuesHelper()
152 .putLong(TIMESTAMP_KEY, mClock.getCurrentTime()) in cacheResult()
163 final long currentTime = mClock.getCurrentTime(); in isDataValid()
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
DMessageWebView.java45 private final Clock mClock = Clock.INSTANCE; field in MessageWebView
91 final long now = mClock.getTime(); in onSizeChanged()
115 mLastSizeChangeTime = mClock.getTime(); in performSizeChange()
/packages/apps/TV/src/com/android/tv/dvr/ui/list/
DDvrHistoryRowAdapter.java54 private final Clock mClock; field in DvrHistoryRowAdapter
63 mClock = clock; in DvrHistoryRowAdapter()
84 long deadLine = Utils.getFirstMillisecondOfDay(mClock.currentTimeMillis()); in start()
113 ((Utils.getFirstMillisecondOfDay(mClock.currentTimeMillis()) - timeMs) in calculateHeaderDate()
146 long firstMillisecondToday = Utils.getFirstMillisecondOfDay(mClock.currentTimeMillis()); in recordedProgramsToScheduledRecordings()
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
DThrottle.java46 private final Clock mClock; field in Throttle
92 mClock = clock; in Throttle()
118 final long now = mClock.getTime(); in updateTimeout()
/packages/apps/TV/src/com/android/tv/guide/
DProgramItemView.java76 private final Clock mClock; field in ProgramItemView
93 Clock clock = ((ProgramItemView) view).mClock;
182 mClock, entry.entryStartUtcMillis, entry.entryEndUtcMillis);
190 mClock.uptimeMillis(), FOCUS_UPDATE_FREQUENCY));
210 mClock = singletons.getClock(); in ProgramItemView()
413 mClock, in updateContentDescription()
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/
DDhcpLeaseRepositoryTest.java84 private Clock mClock; field in DhcpLeaseRepositoryTest
96 when(mClock.elapsedRealtime()).thenReturn(TEST_TIME); in setUp()
98 TEST_IP_PREFIX, TEST_EXCL_SET, TEST_LEASE_TIME_MS, mLog, mClock); in setUp()
340 when(mClock.elapsedRealtime()).thenReturn(newTime); in testRequestLease_InitReboot()
376 when(mClock.elapsedRealtime()).thenReturn(newTime); in testRequestLease_Renewing()
387 when(mClock.elapsedRealtime()).thenReturn(newTime); in testRequestLease_RenewingUnknownAddr()
/packages/apps/TV/src/com/android/tv/data/epg/
DEpgFetcherImpl.java131 private Clock mClock; field in EpgFetcherImpl
169 mClock = clock; in EpgFetcherImpl()
259 if (mClock.currentTimeMillis() - EpgFetchHelper.getLastEpgUpdatedTimestamp(mContext) in fetchImmediatelyIfNeeded()
497 mContext, mClock, entry.getKey().getChannel().getId(), programs); in batchUpdateEpg()
697 if (mClock.currentTimeMillis() - EpgFetchHelper.getLastEpgUpdatedTimestamp(mContext) in fetchEpgFor()
720 mContext, mClock, epgChannel.getChannel().getId(), programs); in fetchEpgFor()
/packages/apps/TV/src/com/android/tv/dvr/
DBaseDvrDataManager.java49 protected final Clock mClock; field in BaseDvrDataManager
62 mClock = clock; in BaseDvrDataManager()
220 if (r.getEndTimeMs() > mClock.currentTimeMillis()) { in filterEndTimeIsPast()

12