Home
last modified time | relevance | path

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

12

/packages/apps/TV/tests/robotests/src/com/android/tv/data/
DProgramDataManagerTest.java67 private FakeClock mClock; field in ProgramDataManagerTest
72 mClock = FakeClock.createWithCurrentTime(); in setUp()
76 RuntimeEnvironment.application, mClock, TimeUnit.DAYS.toMillis(1)); in setUp()
92 mClock, in setUp()
120 int index = stub.getIndex(mClock.currentTimeMillis(), channelId); in testProgramUtils()
123 assertThat(startTimeMs).isAtMost(mClock.currentTimeMillis()); in testProgramUtils()
124 assertThat(mClock.currentTimeMillis()).isLessThan(startTimeMs + programAt.durationMs); in testProgramUtils()
140 mClock.setCurrentTimeMillis(prefetchTimeRangeStartMs + preventSnapDelayMs); in testGetPrograms()
151 .isLessThan(mClock.currentTimeMillis()); in testGetPrograms()
154 .isGreaterThan(mClock.currentTimeMillis()); in testGetPrograms()
[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()
DAppStateUsageStatsBridgeTest.java64 @Mock private AppStateUsageStatsBridge.Clock mClock; field in AppStateUsageStatsBridgeTest
86 when(mClock.getCurrentTime()).thenReturn(STARTING_TIME); in setUp()
88 mBridge.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.java73 private final Clock mClock; field in DhcpLeaseRepository
137 mClock = clock; in DhcpLeaseRepository()
191 final long currentTime = mClock.elapsedRealtime(); in getOffer()
281 final long currentTime = mClock.elapsedRealtime(); in requestLease()
408 final long expTime = mClock.elapsedRealtime() + mLeaseTimeMs; in markLeaseDeclined()
435 removeExpiredLeases(mClock.elapsedRealtime()); in getCommittedLeases()
444 removeExpiredLeases(mClock.elapsedRealtime()); in getDeclinedAddresses()
DDhcpServer.java115 private final Clock mClock; field in DhcpServer
262 mClock = deps.makeClock(); in DhcpServer()
263 mLeaseRepo = deps.makeLeaseRepository(mServingParams, mLog, mClock); in DhcpServer()
785 final long remainingTimeSecs = (lease.getExpTime() - mClock.elapsedRealtime()) / 1000; in getLeaseTimeout()
/packages/apps/TV/src/com/android/tv/data/
DProgramDataManager.java115 private final Clock mClock; field in ProgramDataManager
182 mClock = time; in ProgramDataManager()
301 mClock.currentTimeMillis() - PROGRAM_GUIDE_SNAP_TIME_MS, in prefetchChannel()
499 delayedTime = program.getEndTimeUtcMillis() - mClock.currentTimeMillis(); in updateCurrentProgram()
566 mProgramsUpdateTask = new ProgramsUpdateTask(mClock.currentTimeMillis()); in handleUpdateCurrentPrograms()
580 long time = mClock.currentTimeMillis(); in ProgramsPrefetchTask()
697 long currentTime = mClock.currentTimeMillis(); in onPostExecute()
921 channelId, mClock.currentTimeMillis()); in handleMessage()
939 - 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/TV/src/com/android/tv/dvr/ui/list/
DDvrHistoryRowAdapter.java53 private final Clock mClock; field in DvrHistoryRowAdapter
66 mClock = clock; in DvrHistoryRowAdapter()
88 long deadLine = Utils.getFirstMillisecondOfDay(mClock.currentTimeMillis()); in start()
117 ((Utils.getFirstMillisecondOfDay(mClock.currentTimeMillis()) - timeMs) in calculateHeaderDate()
150 long firstMillisecondToday = Utils.getFirstMillisecondOfDay(mClock.currentTimeMillis()); in recordedProgramsToScheduledRecordings()
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/
DDhcpLeaseRepositoryTest.java98 private Clock mClock; field in DhcpLeaseRepositoryTest
117 reset(mCallbacks, mClock); in initDhcpLeaseRepositoryWithOption()
119 when(mClock.elapsedRealtime()).thenReturn(TEST_TIME); in initDhcpLeaseRepositoryWithOption()
123 TEST_IP_PREFIX, TEST_EXCL_SET, TEST_LEASE_TIME_MS, clientAddr, mLog, mClock); in initDhcpLeaseRepositoryWithOption()
413 when(mClock.elapsedRealtime()).thenReturn(newTime); in testRequestLease_InitReboot()
454 when(mClock.elapsedRealtime()).thenReturn(newTime); in testRequestLease_Renewing()
468 when(mClock.elapsedRealtime()).thenReturn(newTime); in testRequestLease_RenewingUnknownAddr()
/packages/apps/TV/src/com/android/tv/guide/
DProgramItemView.java84 @Inject Clock mClock; field in ProgramItemView
102 Clock clock = ((ProgramItemView) view).mClock;
198 mClock, entry.entryStartUtcMillis, entry.entryEndUtcMillis);
206 mClock.uptimeMillis(), FOCUS_UPDATE_FREQUENCY));
428 mClock, in updateContentDescription()
/packages/apps/TV/src/com/android/tv/data/epg/
DEpgFetcherImpl.java139 private Clock mClock; field in EpgFetcherImpl
155 mClock = clock; in EpgFetcherImpl()
245 if (mClock.currentTimeMillis() - EpgFetchHelper.getLastEpgUpdatedTimestamp(mContext) in fetchImmediatelyIfNeeded()
476 mContext, mClock, entry.getKey().getChannel().getId(), programs); in batchUpdateEpg()
677 if (mClock.currentTimeMillis() - EpgFetchHelper.getLastEpgUpdatedTimestamp(mContext) in fetchEpgFor()
700 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