/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 | 83 private final TestTimeSource mTimeSource = new TestTimeSource(); field in WatchdogStorageUnitTest 87 mTimeSource.updateNow(/* numDaysAgo= */ 0); in setUp() 91 mService = new WatchdogStorage(mContext, /* useDataSystemCarDir= */ false, mTimeSource); in setUp() 197 long startTime = mTimeSource.getCurrentDate().toEpochSecond(); in testSaveAndGetIoOveruseStats() 203 long expectedDuration = mTimeSource.getCurrentDateTime().toEpochSecond() - startTime; in testSaveAndGetIoOveruseStats() 218 long startTime = mTimeSource.getCurrentDate().plusHours(12).toEpochSecond(); in testSaveAndGetIoOveruseStatsWithOffsettedStartTime() 225 long expectedStartTime = mTimeSource.getCurrentDate().toEpochSecond(); in testSaveAndGetIoOveruseStatsWithOffsettedStartTime() 227 mTimeSource.getCurrentDateTime().toEpochSecond() - expectedStartTime; in testSaveAndGetIoOveruseStatsWithOffsettedStartTime() 241 long startTime = mTimeSource.getCurrentDate().toEpochSecond(); in testOverwriteIoOveruseStats() 242 long duration = mTimeSource.getCurrentDateTime().toEpochSecond() - startTime; in testOverwriteIoOveruseStats() [all …]
|
D | WatchdogPerfHandlerUnitTest.java | 249 private final CarWatchdogServiceUnitTest.TestTimeSource mTimeSource = field in WatchdogPerfHandlerUnitTest 327 mTimeSource)); in setUp() 331 mSpiedWatchdogStorage, mTimeSource); in setUp() 515 mTimeSource.updateNow(/* numDaysAgo= */ 1); in testWriteToDatabaseForSaveIoUsageStatsWithForgive() 702 .isEqualTo(mTimeSource.getCurrentDate()); in testWriteMetadataFile() 705 .isEqualTo(mTimeSource.getCurrentDate().minus(RETENTION_PERIOD)); in testWriteMetadataFile() 1783 mTimeSource.updateNow(PACKAGE_KILLABLE_STATE_RESET_DAYS); in testResetPackageKillableStateDuringBootup() 1794 mTimeSource.updateNow(PACKAGE_KILLABLE_STATE_RESET_DAYS / 2); in testResetPackageKillableStateDuringBootup() 1803 mTimeSource.updateNow(/* numDaysAgo= */ 0); in testResetPackageKillableStateDuringBootup() 1823 mTimeSource.updateNow(PACKAGE_KILLABLE_STATE_RESET_DAYS); in testResetPackageKillableStateDuringDateChange() [all …]
|
D | CarWatchdogServiceUnitTest.java | 219 private final TestTimeSource mTimeSource = new TestTimeSource(); field in CarWatchdogServiceUnitTest 311 mTimeSource)); in setUp() 318 mTimeSource.updateNow(/* numDaysAgo= */ 0); in setUp() 320 mSpiedWatchdogStorage, mTimeSource, mMockWatchdogProcessHandler, in setUp() 1409 stats.startTime = mTimeSource.now().getEpochSecond(); in constructInternalIoOveruseStats() 1423 mTimeSource.getCurrentDate()); in sampleDailyIoUsageSummariesForAWeek()
|
/packages/services/Car/experimental/service/src/com/android/experimentalcar/ |
D | DriverDistractionExperimentalFeatureService.java | 214 private final ITimeSource mTimeSource; field in DriverDistractionExperimentalFeatureService 243 mTimeSource = timeSource; in DriverDistractionExperimentalFeatureService() 246 .setElapsedRealtimeTimestamp(mTimeSource.elapsedRealtime()) in DriverDistractionExperimentalFeatureService() 533 .setElapsedRealtimeTimestamp(mTimeSource.elapsedRealtime()) in updateCurrentDistractionEventLocked() 537 long nowUptimeMillis = mTimeSource.uptimeMillis(); in updateCurrentDistractionEventLocked() 577 mLastDispatchUptimeMillis = mTimeSource.uptimeMillis(); in dispatchCurrentDistractionEventToClientsLocked() 636 long oldestFreshTimestamp = mTimeSource.elapsedRealtime() - supplierMaxStaleness; in updateCurrentAwarenessValueLocked() 662 - 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 | 114 private TimeSource mTimeSource; field in WatchdogStorage 136 mTimeSource = timeSource; in WatchdogStorage() 137 mDbHelper = new WatchdogDbHelper(context, useDataSystemCarDir, mTimeSource); in WatchdogStorage() 265 long includingStartEpochSeconds = mTimeSource.getCurrentDate().toEpochSecond(); in getTodayIoUsageStats() 266 long excludingEndEpochSeconds = mTimeSource.getCurrentDateTime().toEpochSecond(); in getTodayIoUsageStats() 308 ZonedDateTime currentDate = mTimeSource.getCurrentDate(); in getHistoricalIoOveruseStats() 393 mTimeSource.now().atZone(ZONE_OFFSET).truncatedTo(STATS_TEMPORAL_UNIT); in getNotForgivenHistoricalIoOveruses() 428 mTimeSource.now().atZone(ZONE_OFFSET).truncatedTo(STATS_TEMPORAL_UNIT); in forgiveHistoricalOveruses() 469 ZonedDateTime currentDate = mTimeSource.getCurrentDate(); in saveIoUsageStats() 1285 private TimeSource mTimeSource; field in WatchdogStorage.WatchdogDbHelper [all …]
|
D | WatchdogPerfHandler.java | 236 private final TimeSource mTimeSource; field in WatchdogPerfHandler 328 mTimeSource = timeSource; in WatchdogPerfHandler() 716 if (!usage.verifyAndSetKillableState(isKillable, mTimeSource.getCurrentDate())) { in setKillablePackageAsUser() 750 if (!usage.verifyAndSetKillableState(isKillable, mTimeSource.getCurrentDate())) { in setPackageKillableStateForAllUsers() 1007 mTimeSource.getCurrentDate()); in resetResourceOveruseStats() 1313 ZonedDateTime curReportDate = mTimeSource.getCurrentDate(); in readFromDatabase() 1430 mTimeSource.getCurrentDate().toEpochSecond())); in writeToDatabase() 1512 ZonedDateTime currentDate = mTimeSource.getCurrentDate(); in checkAndResetUserPackageKillableStatesLocked() 1556 ZonedDateTime currentDate = mTimeSource.getCurrentDate(); in checkAndHandleDateChange() 2165 mLastSystemIoUsageSummaryReportedDate = mTimeSource.getCurrentDate(); in onPullAtom() [all …]
|
/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 | 96 private final TestTimeSource mTimeSource = new TestTimeSource(); field in CarWatchdogServiceTest 157 mMockWatchdogStorage, mTimeSource); in setUp()
|