/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/datasources/api/ |
D | SleepSessionHelperTest.kt | 13 import java.time.Instant 61 val SLEEP_SESSION_1_START_DATE = Instant.parse("2023-02-13T16:00:00.00Z") in <lambda>() 62 val SLEEP_SESSION_1_END_DATE = Instant.parse("2023-02-13T18:00:00.00Z") in <lambda>() 65 val SLEEP_SESSION_2_START_DATE = Instant.parse("2023-02-13T17:30:00.00Z") in <lambda>() 66 val SLEEP_SESSION_2_END_DATE = Instant.parse("2023-02-13T23:15:00.00Z") in <lambda>() 69 val SLEEP_SESSION_3_START_DATE = Instant.parse("2023-02-13T01:00:00.00Z") in <lambda>() 70 val SLEEP_SESSION_3_END_DATE = Instant.parse("2023-02-13T08:20:00.00Z") in <lambda>() 97 val SLEEP_SESSION_1_START_DATE = Instant.parse("2023-02-13T16:00:00.00Z") in clusterSessions_allSessionStartAndEndOnSameDay_withSessionUnknownStart_doesNotIncludeUnknownSessionInMinAndMax() 98 val SLEEP_SESSION_1_END_DATE = Instant.parse("2023-02-13T18:00:00.00Z") in clusterSessions_allSessionStartAndEndOnSameDay_withSessionUnknownStart_doesNotIncludeUnknownSessionInMinAndMax() 101 val SLEEP_SESSION_2_START_DATE = Instant.parse("2023-02-13T17:30:00.00Z") in clusterSessions_allSessionStartAndEndOnSameDay_withSessionUnknownStart_doesNotIncludeUnknownSessionInMinAndMax() [all …]
|
D | LoadPriorityEntriesUseCaseTest.kt | 36 import java.time.Instant in <lambda>() 88 val SLEEP_SESSION_1_START_DATE = Instant.parse("2023-02-13T16:00:00.00Z") in <lambda>() 89 val SLEEP_SESSION_1_END_DATE = Instant.parse("2023-02-13T18:00:00.00Z") in <lambda>() 92 val SLEEP_SESSION_2_START_DATE = Instant.parse("2023-02-13T17:30:00.00Z") in <lambda>() 93 val SLEEP_SESSION_2_END_DATE = Instant.parse("2023-02-13T23:15:00.00Z") in <lambda>() 96 val SLEEP_SESSION_3_START_DATE = Instant.parse("2023-02-13T01:00:00.00Z") in <lambda>() 97 val SLEEP_SESSION_3_END_DATE = Instant.parse("2023-02-13T23:20:00.00Z") in <lambda>() 136 val SLEEP_SESSION_1_START_DATE = Instant.parse("2023-02-13T16:00:00.00Z") in <lambda>() 137 val SLEEP_SESSION_1_END_DATE = Instant.parse("2023-02-13T18:00:00.00Z") in <lambda>() 140 val SLEEP_SESSION_2_START_DATE = Instant.parse("2023-02-13T17:30:00.00Z") in <lambda>() [all …]
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/utils/ |
D | TimeExtensions.kt | 19 import java.time.Instant 20 import java.time.Instant.ofEpochMilli 35 fun getInstant(year: Int, month: Int, day: Int): Instant { in getInstant() 40 fun Long.toInstant(): Instant { in Long() 44 fun Instant.toLocalDate(): LocalDate { in toLocalDate() method 48 fun Instant.toLocalTime(): LocalTime { in Instant() method 52 fun Instant.toLocalDateTime(): LocalDateTime { in Instant() method 56 fun Instant.isOnSameDay(other: Instant): Boolean { in Instant() method 62 fun Instant.isOnDayBefore(other: Instant): Boolean { in Instant() method 68 fun Instant.isOnDayAfter(other: Instant): Boolean { in Instant() method [all …]
|
D | LocalDateTimeFormatter.kt | 23 import java.time.Instant 78 fun formatTime(instant: Instant): String { in formatTime() 83 fun formatLongDate(instant: Instant): String { in formatLongDate() 88 fun formatShortDate(instant: Instant): String { in formatShortDate() 93 fun formatTimeRange(start: Instant, end: Instant): String { in formatTimeRange() 98 fun formatTimeRangeA11y(start: Instant, end: Instant): String { in formatTimeRangeA11y() 103 fun formatWeekdayDateWithYear(time: Instant): String { in formatWeekdayDateWithYear() 111 fun formatWeekdayDateWithoutYear(time: Instant): String { in formatWeekdayDateWithoutYear() 119 fun formatDateRangeWithYear(startTime: Instant, endTime: Instant): String { in formatDateRangeWithYear() 125 fun formatDateRangeWithoutYear(startTime: Instant, endTime: Instant): String { in formatDateRangeWithoutYear() [all …]
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/ |
D | TestConstants.kt | 61 import java.time.Instant in <lambda>() 67 val NOW: Instant = Instant.parse("2022-10-20T07:06:05.432Z") in <lambda>() 68 val MIDNIGHT: Instant = Instant.parse("2022-10-20T00:00:00.000Z") in <lambda>() 70 fun getHeartRateRecord(heartRateValues: List<Long>, startTime: Instant = NOW): HeartRateRecord { in <lambda>() 79 fun getStepsRecord(steps: Long, time: Instant = NOW): StepsRecord { in getStepsRecord() 88 fun getDistanceRecord(distance: Length, time: Instant = NOW): DistanceRecord { in getDistanceRecord() 92 fun getTotalCaloriesBurnedRecord(calories: Energy, time: Instant = NOW): TotalCaloriesBurnedRecord { in getTotalCaloriesBurnedRecord() 97 fun getSleepSessionRecord(startTime: Instant = NOW): SleepSessionRecord { in getSleepSessionRecord() 102 fun getSleepSessionRecord(startTime: Instant, endTime: Instant): SleepSessionRecord { in getSleepSessionRecord() 106 fun getWeightRecord(time: Instant = NOW, weight: Mass): WeightRecord { in getWeightRecord() [all …]
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utiltests/ |
D | TimeExtensionsTest.kt | 31 import java.time.Instant 53 assertThat(testLong.toInstant()).isEqualTo(Instant.ofEpochMilli(testLong)) in longToInstant_returnsCorrectInstant() 61 val instant = Instant.parse("2023-02-14T05:00:00Z") in instantToLocalDate_returnsCorrectLocalDate() 72 val instant = Instant.parse("2023-02-14T20:00:00Z") in instantToLocalTime_returnsCorrectLocalTime() 83 val thisInstant = Instant.parse("2023-02-14T20:00:00Z") in instantIsOnSameDay_whenOtherInstantOnSameLocalDate_returnsTrue() 84 val otherInstant = Instant.parse("2023-02-15T02:00:00Z") in instantIsOnSameDay_whenOtherInstantOnSameLocalDate_returnsTrue() 93 val thisInstant = Instant.parse("2023-02-14T10:00:00Z") in instantIsOnSameDay_whenOtherInstantNotOnSameLocalDate_returnsFalse() 94 val otherInstant = Instant.parse("2023-02-14T20:00:00Z") in instantIsOnSameDay_whenOtherInstantNotOnSameLocalDate_returnsFalse() 103 val thisInstant = Instant.parse("2023-02-14T10:00:00Z") in instantIsOnDayBefore_whenOtherInstantIsOnDayAfter_returnsTrue() 104 val otherInstant = Instant.parse("2023-02-15T20:00:00Z") in instantIsOnDayBefore_whenOtherInstantIsOnDayAfter_returnsTrue() [all …]
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/ |
D | MindfulnessSessionRecordTest.java | 48 import java.time.Instant; 64 .setStartTime(Instant.EPOCH) in tearDown() 65 .setEndTime(Instant.now()) in tearDown() 77 Instant endTime = Instant.now(); in mindfulnessSessionRecordBuilder_allFieldsSet() 78 Instant startTime = endTime.minusSeconds(60); in mindfulnessSessionRecordBuilder_allFieldsSet() 120 Instant endTime = Instant.now(); in mindfulnessSessionRecordBuilder_optionalFieldsUnset() 121 Instant startTime = endTime.minusSeconds(60); in mindfulnessSessionRecordBuilder_optionalFieldsUnset() 146 Instant.now().minusSeconds(60), in mindfulnessSessionRecordBuilder_invalidMindfulnessSessionType() 147 Instant.now(), in mindfulnessSessionRecordBuilder_invalidMindfulnessSessionType() 155 final ZoneOffset defaultZoneOffset = getDefaultZoneOffset(Instant.now()); in mindfulnessSessionRecordBuilder_clearZoneOffsets() [all …]
|
D | ExerciseSessionRecordTest.java | 75 import java.time.Instant; 98 .setStartTime(Instant.EPOCH) in tearDown() 99 .setEndTime(Instant.now()) in tearDown() 315 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testExerciseSessionBuilds_zoneOffsets_offsetsAreDefault() 510 .setStartTime(Instant.EPOCH) in testDeleteRecord_usingTime_forAnotherApp_notDeleted() 511 .setEndTime(Instant.now()) in testDeleteRecord_usingTime_forAnotherApp_notDeleted() 531 buildSession(Instant.now(), Instant.now().plusMillis(10000)), in testUpdateRecords_validInput_dataBaseUpdatedSuccessfully() 532 buildSession(Instant.now(), Instant.now().plusMillis(10000)))); in testUpdateRecords_validInput_dataBaseUpdatedSuccessfully() 540 buildSession(Instant.now(), Instant.now().plusMillis(10000)), in testUpdateRecords_validInput_dataBaseUpdatedSuccessfully() 541 buildSession(Instant.now(), Instant.now().plusMillis(10000))); in testUpdateRecords_validInput_dataBaseUpdatedSuccessfully() [all …]
|
/packages/modules/OnDevicePersonalization/tests/frameworktests/src/android/adservices/ondevicepersonalization/ |
D | LogReaderTest.java | 38 import java.time.Instant; 61 Instant.ofEpochMilli(10), Instant.ofEpochMilli(100)); in testGetRequestsSuccess() 74 null, Instant.ofEpochMilli(100))); in testGetRequestsNullTimeError() 76 Instant.ofEpochMilli(100), null)); in testGetRequestsNullTimeError() 83 Instant.ofEpochMilli(7), Instant.ofEpochMilli(100))); in testGetRequestsError() 89 Instant.ofEpochMilli(-1), Instant.ofEpochMilli(100))); in testGetRequestsNegativeTimeError() 95 Instant.ofEpochMilli(100), Instant.ofEpochMilli(100))); in testGetRequestsBadTimeRangeError() 97 Instant.ofEpochMilli(1000), Instant.ofEpochMilli(100))); in testGetRequestsBadTimeRangeError() 103 Instant.ofEpochMilli(10), Instant.ofEpochMilli(100)); in testGetJoinedEventsSuccess() 121 Instant.ofEpochMilli(7), Instant.ofEpochMilli(100))); in testGetJoinedEventsError() [all …]
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/ |
D | BasalCaloriesAggregationTest.java | 56 import java.time.Instant; 84 Instant now = Instant.now(); in testAggregation_BasalCaloriesBurntTotal_noRecord() 101 Instant now = Instant.now(); in testAggregation_BasalCaloriesBurntTotal_lbm() 102 insertRecords(List.of(getBaseLeanBodyMassRecord(Instant.now(), 50000))); in testAggregation_BasalCaloriesBurntTotal_lbm() 107 .setStartTime(Instant.now().minus(2, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm() 108 .setEndTime(Instant.now().minus(1, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm() 119 .setStartTime(Instant.now().minus(2, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm() 120 .setEndTime(Instant.now().minus(1, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm() 129 Instant now = Instant.now(); in testAggregation_BasalCaloriesBurntTotal_lbm_group() 166 Instant now = Instant.now(); in testAggregation_BasalCaloriesBurntTotal_groupByDuration_lbmDerived() [all …]
|
D | TotalCaloriesAggregationTest.java | 39 import static java.time.Instant.EPOCH; 64 import java.time.Instant; 96 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromDefaultBasalCalories() 109 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromWeightAndHeight() 129 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromLbm() 144 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromBmr() 160 Instant now = Instant.now(); in totalCaloriesBurned_hasActiveCaloriesData_sumActiveAndBasalCalories() 178 Instant now = Instant.now(); in totalCaloriesBurned_hasTotalCaloriesData_addBasalCaloriesAtGaps() 198 Instant now = Instant.now(); in totalCaloriesBurned_hasActiveAndTotalCaloriesData_addBasalCaloriesAtGaps() 229 Instant now = Instant.now(); in totalCaloriesBurned_totalCaloriesDataWithoutGap_equalsToTotalCalories() [all …]
|
/packages/modules/Permission/SafetyCenter/Persistence/java/com/android/safetycenter/persistence/ |
D | PersistedSafetyCenterIssue.java | 24 import java.time.Instant; 34 private final Instant mFirstSeenAt; 35 @Nullable private final Instant mDismissedAt; 37 @Nullable private final Instant mNotificationDismissedAt; 41 Instant firstSeenAt, in PersistedSafetyCenterIssue() 42 @Nullable Instant dismissedAt, in PersistedSafetyCenterIssue() 44 @Nullable Instant notificationDismissedAt) { in PersistedSafetyCenterIssue() 58 public Instant getFirstSeenAt() { in getFirstSeenAt() 64 public Instant getDismissedAt() { in getDismissedAt() 78 public Instant getNotificationDismissedAt() { in getNotificationDismissedAt() [all …]
|
/packages/modules/HealthFitness/framework/java/android/health/connect/ |
D | TimeInstantRangeFilter.java | 22 import java.time.Instant; 33 private final Instant mStartTime; 34 private final Instant mEndTime; 43 private TimeInstantRangeFilter(@Nullable Instant startTime, @Nullable Instant endTime) { in TimeInstantRangeFilter() 52 mStartTime = startTime != null ? startTime : Instant.EPOCH; in TimeInstantRangeFilter() 53 mEndTime = endTime != null ? endTime : Instant.now().plus(1, ChronoUnit.DAYS); in TimeInstantRangeFilter() 60 public Instant getStartTime() { in getStartTime() 68 public Instant getEndTime() { in getEndTime() 101 @Nullable private Instant mStartTime; 103 @Nullable private Instant mEndTime; [all …]
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/storage/datatypehelpers/ |
D | MergeDataHelper.java | 36 import java.time.Instant; 55 private final Instant mStartTime; 56 private final Instant mEndTime; 61 public Instant getStartTime() { in getStartTime() 65 public Instant getEndTime() { in getEndTime() 82 Instant startTime, in RecordData() 83 Instant endTime, in RecordData() 100 private Instant mStartTime; 101 private Instant mEndTime; 145 mStartTime = Instant.ofEpochMilli(startTime); in readCursor() [all …]
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/readdata/ |
D | OrderingTests.java | 46 import java.time.Instant; 67 Instant startTime1 = Instant.now().minus(1, DAYS).truncatedTo(DAYS); in ordering_ascendingSetToTrue_sortedByStartTimeInAscendingOrder() 68 Instant startTime2 = startTime1.plus(1, HOURS); in ordering_ascendingSetToTrue_sortedByStartTimeInAscendingOrder() 69 Instant startTime3 = startTime2.plus(1, HOURS); in ordering_ascendingSetToTrue_sortedByStartTimeInAscendingOrder() 90 Instant startTime1 = Instant.now().minus(1, DAYS).truncatedTo(DAYS); in ordering_ascendingSetToFalse_sortedByStartTimeInDescendingOrder() 91 Instant startTime2 = startTime1.plus(1, HOURS); in ordering_ascendingSetToFalse_sortedByStartTimeInDescendingOrder() 92 Instant startTime3 = startTime2.plus(1, HOURS); in ordering_ascendingSetToFalse_sortedByStartTimeInDescendingOrder() 113 Instant startTime1 = Instant.now().minus(1, DAYS).truncatedTo(DAYS); in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder() 114 Instant startTime2 = startTime1.plus(1, HOURS); in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder() 115 Instant startTime3 = startTime2.plus(1, HOURS); in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder() [all …]
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/datasources/api/ |
D | SleepSessionHelper.kt | 16 import java.time.Instant in <lambda>() 39 ): UseCaseResults<Pair<Instant, Instant>?> = in <lambda>() 79 val minStartTime: Instant = in <lambda>() 81 val maxEndTime: Instant = in <lambda>() 101 private fun handleSessionsCrossingMidnight(entries: List<Record>): Pair<Instant, Instant> { in <lambda>() 106 var minStartTime: Instant = Instant.MAX in <lambda>() 107 var maxEndTime: Instant = Instant.MIN in <lambda>() 147 lastDateWithDataInstant: Instant, in <lambda>() 148 lastDayMinStartTime: Instant, in <lambda>() 149 lastDayMaxEndTime: Instant in <lambda>() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/framework/src/android/adservices/measurement/ |
D | DeletionParamTest.java | 27 import java.time.Instant; 38 Instant.ofEpochMilli(1642060000000L), in createExample() 39 Instant.ofEpochMilli(1642060538000L), in createExample() 51 Instant.MIN, in createDefaultExample() 52 Instant.MAX, in createDefaultExample() 75 expect.that(request.getStart()).isEqualTo(Instant.MIN); in verifyDefaultExample() 76 expect.that(request.getEnd()).isEqualTo(Instant.MAX); in verifyDefaultExample() 88 Instant.MIN, in testMissingOrigin_throwException() 89 Instant.MAX, in testMissingOrigin_throwException() 103 Instant.MIN, in testMissingDomainUris_throwException() [all …]
|
/packages/modules/HealthFitness/tests/integrationtests/src/android/healthconnect/tests/permissions/ |
D | GrantTimeIntegrationTest.java | 43 import java.time.Instant; 96 Instant grantTime = getHealthDataHistoricalAccessStartDate(DEFAULT_APP_PACKAGE); in testGrantHealthPermission_noPermissionsGranted_returnsNull() 103 Instant grantTime = getHealthDataHistoricalAccessStartDate(DEFAULT_APP_PACKAGE); in testGrantHealthPermission_permissionGranted_returnsAdequateTime() 116 Instant grantTime = getHealthDataHistoricalAccessStartDate(DEFAULT_APP_PACKAGE); in testGrantHealthPermission_permGrantedViaPackageManager_returnsAdequateTime() 124 Instant grantTime = getHealthDataHistoricalAccessStartDate(DEFAULT_APP_PACKAGE); in testGrantHealthPermission_permissionGrantedToSharedUser_returnsAdequateTime() 132 Instant grantTime = getHealthDataHistoricalAccessStartDate(SHARED_USER_APP); in testGrantHealthPermission_permissionGrantedForSharedUser_returnsAdequateTime() 134 assertThat(grantTime.compareTo(Instant.now())).isLessThan(0); in testGrantHealthPermission_permissionGrantedForSharedUser_returnsAdequateTime() 141 Instant grantTime = getHealthDataHistoricalAccessStartDate(DEFAULT_APP_PACKAGE); in testGrantHealthPermission_twoPermissionsGranted_returnsTheSameTime() 143 Instant grantTime2 = getHealthDataHistoricalAccessStartDate(DEFAULT_APP_PACKAGE); in testGrantHealthPermission_twoPermissionsGranted_returnsTheSameTime() 151 Instant grantTime = getHealthDataHistoricalAccessStartDate(DEFAULT_APP_PACKAGE); in testGrantHealthPermission_notAllPermissionsRevoked_returnsTheSameTime() [all …]
|
/packages/modules/Permission/SafetyCenter/Persistence/tests/java/com/android/safetycenter/persistence/ |
D | SafetyCenterIssuesPersistenceValidTest.kt | 22 import java.time.Instant 66 .setFirstSeenAt(Instant.ofEpochMilli(1654041600000)) 72 .setFirstSeenAt(Instant.ofEpochMilli(1654041600000)) 78 .setFirstSeenAt(Instant.ofEpochMilli(1654128000000)) 79 .setDismissedAt(Instant.ofEpochMilli(1654214400000)) 86 .setFirstSeenAt(Instant.ofEpochMilli(1654128000000)) 87 .setDismissedAt(Instant.ofEpochMilli(1654214400000)) 94 .setFirstSeenAt(Instant.ofEpochMilli(1654128000000)) 95 .setDismissedAt(Instant.ofEpochMilli(1654214400000)) 96 .setNotificationDismissedAt(Instant.ofEpochMilli(1654214400000)) [all …]
|
D | SafetyCenterIssuesPersistenceWriteTest.kt | 21 import java.time.Instant 61 .setFirstSeenAt(Instant.ofEpochMilli(1654041600000)) 65 .setFirstSeenAt(Instant.ofEpochMilli(1654041600000)) 66 .setDismissedAt(Instant.ofEpochMilli(1654214400000)) 71 .setFirstSeenAt(Instant.ofEpochMilli(1654128000000)) 72 .setDismissedAt(Instant.ofEpochMilli(1654214400000)) 77 .setFirstSeenAt(Instant.ofEpochMilli(1654128000000)) 78 .setDismissedAt(Instant.ofEpochMilli(1654214400000)) 79 .setNotificationDismissedAt(Instant.ofEpochMilli(1654214400000)) 84 .setFirstSeenAt(Instant.ofEpochMilli(1654128000000)) [all …]
|
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/ |
D | DataFactory.java | 58 import java.time.Instant; 68 public static final Instant NOW = Instant.now().truncatedTo(ChronoUnit.MILLIS); 69 public static final Instant SESSION_START_TIME = NOW.minus(10, ChronoUnit.DAYS); 70 public static final Instant SESSION_END_TIME = SESSION_START_TIME.plus(1, ChronoUnit.HOURS); 256 public static ExerciseRoute.Location buildLocationTimePoint(Instant startTime) { in buildLocationTimePoint() 258 Instant.ofEpochMilli( in buildLocationTimePoint() 296 Instant instant = NOW; in getHeartRateRecord() 316 public static HeartRateRecord getHeartRateRecord(int heartRate, Instant instant) { in getHeartRateRecord() 321 List<HeartRateRecord.HeartRateSample> samples, Instant start, Instant end) { in getHeartRateRecord() 326 int heartRate, Instant instant, String clientId) { in getHeartRateRecord() [all …]
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/storage/utils/ |
D | TimeUtils.java | 20 import java.time.Instant; 29 public static long getDurationInMillis(Instant start, Instant end) { in getDurationInMillis() 35 public static Instant latest(Instant first, Instant second) { in latest() 40 public static Instant earliest(Instant first, Instant second) { in earliest()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/ |
D | DebugReportSenderWorkerTest.java | 54 import java.time.Instant; 112 when(mAdSelectionDebugReportDao.getDebugReportsBeforeTime(any(Instant.class), anyInt())) in testRunDebugReportSenderSuccess() 116 .deleteDebugReportsBeforeTime(any(Instant.class)); in testRunDebugReportSenderSuccess() 123 .getDebugReportsBeforeTime(any(Instant.class), anyInt()); in testRunDebugReportSenderSuccess() 129 .deleteDebugReportsBeforeTime(any(Instant.class)); in testRunDebugReportSenderSuccess() 139 when(mAdSelectionDebugReportDao.getDebugReportsBeforeTime(any(Instant.class), anyInt())) in testRunDebugReportSenderPartialFailureDoesNotBreakOverallSuccess() 143 .deleteDebugReportsBeforeTime(any(Instant.class)); in testRunDebugReportSenderPartialFailureDoesNotBreakOverallSuccess() 150 .getDebugReportsBeforeTime(any(Instant.class), anyInt()); in testRunDebugReportSenderPartialFailureDoesNotBreakOverallSuccess() 156 .deleteDebugReportsBeforeTime(any(Instant.class)); in testRunDebugReportSenderPartialFailureDoesNotBreakOverallSuccess() 166 when(mAdSelectionDebugReportDao.getDebugReportsBeforeTime(any(Instant.class), anyInt())) in testRunDebugReportSenderDoesNotFailsOnException() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/kanon/ |
D | ServerParametersDaoTest.java | 29 import java.time.Instant; 35 private static final Instant INSTANT_1 = Instant.now(); 36 private static final Instant INSTANT_2 = Instant.now().plusSeconds(123); 37 private static final Instant INSTANT_3 = Instant.now().plusSeconds(1245); 39 private static final Instant STATIC_INSTANT = Instant.now(); 60 mServerParametersDao.getActiveServerParameters(Instant.now()); in testGetActiveServerParameters_noActiveParamsPresents_returnsNull() 121 .setServerParamsSignExpiryInstant(Instant.now().minusSeconds(100)) in testDeleteAllParameters_deletesAllParameters() 125 .setServerParamsSignExpiryInstant(Instant.now().minusSeconds(100)) in testDeleteAllParameters_deletesAllParameters() 133 mServerParametersDao.getActiveServerParameters(Instant.now()); in testDeleteAllParameters_deletesAllParameters()
|
/packages/modules/Permission/service/java/com/android/safetycenter/data/ |
D | SafetyCenterIssueDismissalRepository.java | 50 import java.time.Instant; 113 Instant dismissedAt = issueData.getDismissedAt(); in isIssueDismissed() 128 Duration timeSinceLastDismissal = Duration.between(dismissedAt, Instant.now()); in isIssueDismissed() 143 Instant now = Instant.now(); in dismissIssue() 195 issueData.setNotificationDismissedAt(Instant.now()); in dismissNotification() 204 Instant getIssueFirstSeenAt(SafetyCenterIssueKey safetyCenterIssueKey) { in getIssueFirstSeenAt() 213 private Instant getNotificationDismissedAt(SafetyCenterIssueKey safetyCenterIssueKey) { in getNotificationDismissedAt() 233 Instant dismissedAt = getNotificationDismissedAt(issueKey); in isNotificationDismissedNow() 245 Instant canResurfaceAt = dismissedAt.plus(resurfaceDelay); in isNotificationDismissedNow() 246 return Instant.now().isBefore(canResurfaceAt); in isNotificationDismissedNow() [all …]
|