/packages/services/Car/experimental/tests/experimentalcarservice_unit_test/src/com/android/experimentalcar/ |
D | DriverDistractionExperimentalFeatureServiceTest.java | 159 private FakeTimeSource mTimeSource; field in DriverDistractionExperimentalFeatureServiceTest 165 mTimeSource = new FakeTimeSource(INITIAL_TIME); in setUp() 181 mService = new DriverDistractionExperimentalFeatureService(mSpyContext, mTimeSource, in setUp() 238 mTimeSource, mExpiredAwarenessTimer, in testInit_bindsToServicesInXmlConfig() 304 mTimeSource.setTimeMillis(preferredSupplierEventTime); in testPreferredAwarenessEvent_becomesStale_fallsBackToFallbackEvent() 309 mTimeSource.setTimeMillis(fallbackSupplierEventTime); in testPreferredAwarenessEvent_becomesStale_fallsBackToFallbackEvent() 317 mTimeSource.setTimeMillis( in testPreferredAwarenessEvent_becomesStale_fallsBackToFallbackEvent() 326 .setElapsedRealtimeTimestamp(mTimeSource.elapsedRealtime()) in testPreferredAwarenessEvent_becomesStale_fallsBackToFallbackEvent() 348 mTimeSource.setTimeMillis(INITIAL_TIME + 1); in testGetLastDistractionEvent_afterEventEmit_returnsLastEvent() 349 emitDriverAwarenessEvent(mFallbackSupplier, mTimeSource.elapsedRealtime(), in testGetLastDistractionEvent_afterEventEmit_returnsLastEvent() [all …]
|
D | TouchDriverAwarenessSupplierTest.java | 58 private FakeTimeSource mTimeSource; field in TouchDriverAwarenessSupplierTest 68 mTimeSource = new FakeTimeSource(INITIAL_TIME); in setUp() 72 mTimeSource)); in setUp()
|
D | GazeDriverAwarenessSupplierTest.java | 53 private FakeTimeSource mTimeSource; field in GazeDriverAwarenessSupplierTest 71 mTimeSource = new FakeTimeSource(START_TIME_MILLIS); in setUp() 72 mGazeSupplier = spy(new GazeDriverAwarenessSupplier(mSpyContext, mTimeSource)); in setUp()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/watchdog/ |
D | WatchdogStorageUnitTest.java | 68 private final TestTimeSource mTimeSource = new TestTimeSource(); field in WatchdogStorageUnitTest 72 mTimeSource.updateNow(/* numDaysAgo= */ 0); in setUp() 76 mService = new WatchdogStorage(mContext, /* useDataSystemCarDir= */ false, mTimeSource); in setUp() 172 long startTime = mTimeSource.getCurrentDate().toEpochSecond(); in testSaveAndGetIoOveruseStats() 178 long expectedDuration = mTimeSource.getCurrentDateTime().toEpochSecond() - startTime; in testSaveAndGetIoOveruseStats() 190 long startTime = mTimeSource.getCurrentDate().plusHours(12).toEpochSecond(); in testSaveAndGetIoOveruseStatsWithOffsettedStartTime() 197 long expectedStartTime = mTimeSource.getCurrentDate().toEpochSecond(); in testSaveAndGetIoOveruseStatsWithOffsettedStartTime() 199 mTimeSource.getCurrentDateTime().toEpochSecond() - expectedStartTime; in testSaveAndGetIoOveruseStatsWithOffsettedStartTime() 210 long startTime = mTimeSource.getCurrentDate().toEpochSecond(); in testOverwriteIoOveruseStats() 211 long duration = mTimeSource.getCurrentDateTime().toEpochSecond() - startTime; in testOverwriteIoOveruseStats() [all …]
|
D | CarWatchdogServiceUnitTest.java | 273 private final TestTimeSource mTimeSource = new TestTimeSource(); field in CarWatchdogServiceUnitTest 360 mTimeSource)); in setUp() 369 mTimeSource.updateNow(/* numDaysAgo= */ 0); in setUp() 371 mSpiedWatchdogStorage, mTimeSource); in setUp() 795 long startTime = mTimeSource.getCurrentDateTime().minusDays(4).toEpochSecond(); in testGetResourceOveruseStatsForPast7days() 796 long duration = mTimeSource.now().getEpochSecond() - startTime; in testGetResourceOveruseStatsForPast7days() 844 mTimeSource.now().getEpochSecond(), STATS_DURATION_SECONDS) in testGetResourceOveruseStatsForPast7daysWithNoHistory() 860 long startTime = mTimeSource.getCurrentDateTime().minusDays(4).toEpochSecond(); in testGetResourceOveruseStatsForPast7daysWithNoCurrentStats() 861 long duration = mTimeSource.now().getEpochSecond() - startTime; in testGetResourceOveruseStatsForPast7daysWithNoCurrentStats() 975 ZonedDateTime now = mTimeSource.getCurrentDateTime(); in testGetAllResourceOveruseStatsWithNoMinimumForPast7days() [all …]
|
/packages/services/Car/experimental/service/src/com/android/experimentalcar/ |
D | DriverDistractionExperimentalFeatureService.java | 210 private final ITimeSource mTimeSource; field in DriverDistractionExperimentalFeatureService 239 mTimeSource = timeSource; in DriverDistractionExperimentalFeatureService() 242 .setElapsedRealtimeTimestamp(mTimeSource.elapsedRealtime()) in DriverDistractionExperimentalFeatureService() 525 .setElapsedRealtimeTimestamp(mTimeSource.elapsedRealtime()) in updateCurrentDistractionEventLocked() 529 long nowUptimeMillis = mTimeSource.uptimeMillis(); in updateCurrentDistractionEventLocked() 569 mLastDispatchUptimeMillis = mTimeSource.uptimeMillis(); in dispatchCurrentDistractionEventToClientsLocked() 628 long oldestFreshTimestamp = mTimeSource.elapsedRealtime() - supplierMaxStaleness; in updateCurrentAwarenessValueLocked() 654 - mTimeSource.elapsedRealtime() in scheduleExpirationTimerLocked()
|
D | TouchDriverAwarenessSupplier.java | 64 private final ITimeSource mTimeSource; field in TouchDriverAwarenessSupplier 102 mTimeSource = timeSource; in TouchDriverAwarenessSupplier() 106 handlePermitRefreshLocked(mTimeSource.elapsedRealtime()); in TouchDriverAwarenessSupplier() 124 new DriverAwarenessEvent(mTimeSource.elapsedRealtime(), in onReady()
|
D | GazeDriverAwarenessSupplier.java | 52 private final ITimeSource mTimeSource; field in GazeDriverAwarenessSupplier 79 mTimeSource = timeSource; in GazeDriverAwarenessSupplier() 143 mTimeSource.elapsedRealtime(), mConfiguration.initialValue)); in onReady()
|
/packages/services/Car/service/src/com/android/car/watchdog/ |
D | WatchdogStorage.java | 109 private TimeSource mTimeSource; field in WatchdogStorage 124 mTimeSource = timeSource; in WatchdogStorage() 125 mDbHelper = new WatchdogDbHelper(context, useDataSystemCarDir, mTimeSource); in WatchdogStorage() 255 long includingStartEpochSeconds = mTimeSource.getCurrentDate().toEpochSecond(); in getTodayIoUsageStats() 256 long excludingEndEpochSeconds = mTimeSource.getCurrentDateTime().toEpochSecond(); in getTodayIoUsageStats() 301 ZonedDateTime currentDate = mTimeSource.getCurrentDate(); in getHistoricalIoOveruseStats() 391 mTimeSource.now().atZone(ZONE_OFFSET).truncatedTo(STATS_TEMPORAL_UNIT); in getNotForgivenHistoricalIoOveruses() 426 mTimeSource.now().atZone(ZONE_OFFSET).truncatedTo(STATS_TEMPORAL_UNIT); in forgiveHistoricalOveruses() 470 ZonedDateTime currentDate = mTimeSource.getCurrentDate(); in saveIoUsageStats() 1265 private TimeSource mTimeSource; field in WatchdogStorage.WatchdogDbHelper [all …]
|
D | WatchdogPerfHandler.java | 233 private final TimeSource mTimeSource; field in WatchdogPerfHandler 321 mTimeSource = timeSource; in WatchdogPerfHandler() 1188 ZonedDateTime curReportDate = mTimeSource.getCurrentDate(); in readFromDatabase() 1391 ZonedDateTime currentDate = mTimeSource.getCurrentDate(); in checkAndHandleDateChange() 1999 mLastSystemIoUsageSummaryReportedDate = mTimeSource.getCurrentDate(); in onPullAtom() 2009 mLastUidIoUsageSummaryReportedDate = mTimeSource.getCurrentDate(); in onPullAtom() 2019 mTimeSource.getCurrentDate().minus(RETENTION_PERIOD); in readMetadataFileLocked() 2063 ZonedDateTime now = mTimeSource.getCurrentDate(); in pullAtomsForWeeklyPeriodsSinceReportedDate()
|
/packages/services/Car/tests/carservice_test/src/com/android/car/os/ |
D | CarPerformanceManagerTest.java | 59 private final TestTimeSource mTimeSource = new TestTimeSource(); field in CarPerformanceManagerTest 83 getContext(), mMockBuiltinPackageContext, mMockWatchdogStorage, mTimeSource); in configureMockedHal()
|
/packages/services/Car/tests/carservice_test/src/com/android/car/watchdog/ |
D | CarWatchdogServiceTest.java | 94 private final TestTimeSource mTimeSource = new TestTimeSource(); field in CarWatchdogServiceTest 149 mMockWatchdogStorage, mTimeSource); in setUp()
|