/packages/modules/HealthFitness/framework/java/android/health/connect/ |
D | LocalTimeRangeFilter.java | 23 import java.time.LocalDateTime; 29 private final LocalDateTime mLocalStartTime; 30 private final LocalDateTime mLocalEndTime; 40 @Nullable LocalDateTime localStartTime, @Nullable LocalDateTime localEndTime) { in LocalTimeRangeFilter() 53 : LocalDateTime.ofInstant(Instant.EPOCH, ZoneOffset.MIN); in LocalTimeRangeFilter() 57 : LocalDateTime.ofInstant( in LocalTimeRangeFilter() 65 public LocalDateTime getStartTime() { in getStartTime() 73 public LocalDateTime getEndTime() { in getEndTime() 107 private LocalDateTime mLocalStartTime; 110 private LocalDateTime mLocalEndTime; [all …]
|
D | AggregateRecordsGroupedByPeriodResponse.java | 26 import java.time.LocalDateTime; 39 private LocalDateTime mStartTime; 40 private LocalDateTime mEndTime; 50 @NonNull LocalDateTime startTime, in AggregateRecordsGroupedByPeriodResponse() 51 @NonNull LocalDateTime endTime, in AggregateRecordsGroupedByPeriodResponse() 73 public LocalDateTime getStartTime() { in getStartTime() 78 public AggregateRecordsGroupedByPeriodResponse<T> setStartTime(LocalDateTime startTime) { in setStartTime() 87 public LocalDateTime getEndTime() { in getEndTime() 92 public AggregateRecordsGroupedByPeriodResponse<T> setEndTime(LocalDateTime endTime) { in setEndTime()
|
D | TimeRangeFilterHelper.java | 23 import java.time.LocalDateTime; 73 public static LocalDateTime getLocalTimeFromMillis(Long localDateTimeMillis) { in getLocalTimeFromMillis() 74 return LocalDateTime.ofInstant( in getLocalTimeFromMillis() 78 public static long getMillisOfLocalTime(LocalDateTime time) { in getMillisOfLocalTime() 87 @NonNull LocalDateTime time, @Nullable ZoneOffset zoneOffset) { in getInstantFromLocalTime()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ |
D | TimeRangeFilterTest.java | 33 import java.time.LocalDateTime; 44 LocalDateTime startTime = LocalDateTime.MIN; in testLocalTimeRangeFilter() 45 LocalDateTime endTime = LocalDateTime.MAX; in testLocalTimeRangeFilter() 93 LocalDateTime endTime = LocalDateTime.MAX; in testStartTimeLocalRangeFilter_startTimeNull() 102 LocalDateTime startTime = LocalDateTime.MIN; in testEndTimeLocalRangeFilter_endTimeNull() 126 LocalDateTime time = LocalDateTime.of(2024, 2, 1, 18, 0, 0); in localTimeRange_startTimeNotLaterThanEndTime_throws()
|
/packages/modules/ConfigInfrastructure/service/java/com/android/server/deviceconfig/ |
D | BootNotificationCreator.java | 24 import java.time.LocalDateTime; 69 private LocalDateTime lastReboot; 87 this.lastReboot = LocalDateTime.now(ZoneId.systemDefault()); in BootNotificationCreator() 112 LocalDateTime currentTime = now.toLocalDateTime(); in onPropertiesChanged() 113 LocalDateTime postTime = now.toLocalDate().atTime(REBOOT_HOUR, REBOOT_MINUTE); in onPropertiesChanged() 115 LocalDateTime scheduledPostTime = in onPropertiesChanged() 148 LocalDateTime now = LocalDateTime.now(ZoneId.systemDefault()); in onReceive() 191 private void tryAgainIn24Hours(LocalDateTime currentTime) { in tryAgainIn24Hours() 199 LocalDateTime postTime = in tryAgainIn24Hours()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/ |
D | TimeTest.java | 25 import java.time.LocalDateTime; 37 LocalDateTime dateTime = getUtcLocalDateTime("2022-01-15 00:00:01"); in roundDownToDay_oneSecondAfterStartOfDay() 48 LocalDateTime dateTime = getUtcLocalDateTime("2022-01-15 23:59:59"); in roundDownToDay_oneSecondBeforeNextDay() 57 private static LocalDateTime getUtcLocalDateTime(String text) { in getUtcLocalDateTime() 58 return LocalDateTime.parse(text, FORMATTER).atOffset(ZoneOffset.UTC).toLocalDateTime(); in getUtcLocalDateTime()
|
/packages/modules/Bluetooth/service/src/ |
D | AutoOnFeature.kt | 44 import java.time.LocalDateTime 162 private val now: LocalDateTime, 163 private val target: LocalDateTime, 203 private fun writeDateToStorage(date: LocalDateTime, resolver: ContentResolver): Boolean { in writeDateToStorage() 207 private fun getDateFromStorage(resolver: ContentResolver): LocalDateTime? { in getDateFromStorage() 209 return date?.let { LocalDateTime.parse(it) } in getDateFromStorage() 222 val now = LocalDateTime.now() in start() 238 private fun nextTimeout(now: LocalDateTime) = in nextTimeout() 239 LocalDateTime.of(now.toLocalDate(), LocalTime.of(5, 0)).plusDays(1) in nextTimeout()
|
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/util/ |
D | DateTimeUtils.java | 34 import java.time.LocalDateTime; 89 final LocalDate whenDate = LocalDateTime.ofInstant(Instant.ofEpochMilli(when), in getDateHeaderString() 132 final LocalDateTime oneLocalDateTime = LocalDateTime.ofInstant(oneInstant, zoneId); in isSameDate() 135 final LocalDateTime twoLocalDateTime = LocalDateTime.ofInstant(twoInstant, zoneId); in isSameDate()
|
/packages/apps/Nfc/tests/unit/src/com/android/nfc/ |
D | NfcEventLogTest.java | 45 import java.time.LocalDateTime; 80 LocalDateTime localDateTime = LocalDateTime.MIN; in testLogEvent() 102 LocalDateTime localDateTime = LocalDateTime.MIN; in testMultipleLogEvents() 126 LocalDateTime localDateTime = LocalDateTime.MIN; in testReadEventsFromLogFile()
|
/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/extensions/ |
D | Flow.kt | 25 import java.time.LocalDateTime in <lambda>() 77 LocalDateTime.ofEpochSecond((before.media.getTimestamp() / 1000), 0, ZoneOffset.UTC) in insertMonthSeparators() 79 LocalDateTime.ofEpochSecond((after.media.getTimestamp() / 1000), 0, ZoneOffset.UTC) in insertMonthSeparators() 85 if (afterLocalDateTime.getYear() != LocalDateTime.now().getYear()) "MMMM YYYY" in insertMonthSeparators()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/ |
D | DataFactory.java | 35 import java.time.LocalDateTime; 79 static LocalTimeRangeFilter getTimeFilter(LocalDateTime start, LocalDateTime end) { in getTimeFilter() 89 static LocalTimeRangeFilter getOpenStartTimeFilter(LocalDateTime end) { in getOpenStartTimeFilter() 103 static LocalTimeRangeFilter getOpenEndTimeFilter(LocalDateTime start) { in getOpenEndTimeFilter()
|
D | AggregateWithFiltersTest.java | 76 import java.time.LocalDateTime; 153 LocalDateTime localTime = startTime.atOffset(mCurrentZone).toLocalDateTime(); in dataOriginFilter_invalidApp_noDataReturned() 201 LocalDateTime localTime = startTime.atOffset(mCurrentZone).toLocalDateTime(); in dataOriginFilter_appNotInPriorityList_noDataReturned() 246 LocalDateTime localTime = startTime.atOffset(mCurrentZone).toLocalDateTime(); in dataOriginFilter_noDataFromFilteredApps_noDataReturned() 287 LocalDateTime localTime = startTime.atOffset(mCurrentZone).toLocalDateTime(); in timeRangeFilter_noDataWithinTimeInterval_noDataReturned() 327 LocalDateTime startLocalTime = startTime.atOffset(dataZone).toLocalDateTime(); in timeRangeFilter_priorityType_outOfRangePriorityDataTrimmed() 328 LocalDateTime endLocalTime = endTime.atOffset(dataZone).toLocalDateTime(); in timeRangeFilter_priorityType_outOfRangePriorityDataTrimmed() 365 LocalDateTime startLocalTime = startTime.atOffset(dataZone).toLocalDateTime(); in timeRangeFilter_nonPriorityType_outOfRangeNonPriorityDataExcluded() 366 LocalDateTime endLocalTime = endTime.atOffset(dataZone).toLocalDateTime(); in timeRangeFilter_nonPriorityType_outOfRangeNonPriorityDataExcluded() 398 LocalDateTime endLocalTime = filterEndTime.atOffset(dataZone).toLocalDateTime(); in timeRangeFilter_openStartTime_aggregateDataFromEpoch() [all …]
|
D | AggregationApisTest.java | 80 import java.time.LocalDateTime; 142 LocalDateTime time = LocalDateTime.now(ZoneOffset.UTC).minusDays(2); in groupByPeriod_noData_nullResponses() 213 LocalDateTime localTime = time.atOffset(dataZone).toLocalDateTime(); in groupByDurationWithLocalFilter_distanceTotal() 254 LocalDateTime localTime = time.atOffset(dataZone).toLocalDateTime(); in groupByPeriod_weightAvg() 261 LocalDateTime startTime = localTime.minusDays(70); in groupByPeriod_weightAvg() 353 LocalDateTime localTime = time.atOffset(UTC).toLocalDateTime(); in groupByPeriod_stepsCadenceMax() 412 LocalDateTime.now(ZoneOffset.UTC).minusDays(1), in groupByPeriod_zeroPeriod_throws() 413 LocalDateTime.now(ZoneOffset.UTC))) in groupByPeriod_zeroPeriod_throws() 426 LocalDateTime localTime = LocalDateTime.now(ZoneOffset.UTC); in groupByPeriod_hugeNumberOfGroups_throws()
|
/packages/services/Car/tests/obd2_app/src/com/google/android/car/obd2app/ |
D | StatusNotification.java | 21 import java.time.LocalDateTime; 44 LocalDateTime now = LocalDateTime.now(); in notifyDataCapture()
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/autodelete/ |
D | AutoDeleteRange.kt | 20 import java.time.LocalDateTime in <lambda>() 57 val localDateTimeNow: LocalDateTime = timeSource.currentLocalDateTime() in autoDeleteRangeEnd() 61 val exactlyXMonthsAgo: LocalDateTime = in autoDeleteRangeEnd()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/notification/ |
D | NotificationHelperService.java | 37 import java.time.LocalDateTime; 163 final LocalDateTime now = LocalDateTime.now(ZoneId.systemDefault()); in shouldDisplayNotification() 172 LocalDateTime savedDate = null; in shouldDisplayNotification() 174 savedDate = LocalDateTime.parse(date); in shouldDisplayNotification()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/ |
D | WeightRecordTest.java | 73 import java.time.LocalDateTime; 259 LocalDateTime recordTime = LocalDateTime.now(ZoneOffset.MIN); in testDeleteWeightRecord_time_filters_local() 541 LocalDateTime endTimeLocal = LocalDateTime.ofInstant(endTime, offset); in testAggregatePeriodForZoneOffset() 558 LocalDateTime groupBoundary = endTimeLocal.minusDays(3); in testAggregatePeriodForZoneOffset() 618 LocalDateTime.ofInstant(t1, zonePlusFive)) in testAggregateDuration_differentTimeZones_correctBucketTimes() 620 LocalDateTime.ofInstant(t3, zonePlusSix)) in testAggregateDuration_differentTimeZones_correctBucketTimes() 658 LocalDateTime endTimeLocal = LocalDateTime.ofInstant(endTime, offset); in testDurationLocalTimeAggregationZoneOffset() 708 LocalDateTime endTimeLocal = LocalDateTime.now(ZoneOffset.UTC); in testAggregateLocalFilter_minOffsetRecord() 756 LocalDateTime endTimeLocal = LocalDateTime.ofInstant(endTimeInstant, offset); in testOffset() 796 LocalDateTime endTimeLocal = LocalDateTime.now(ZoneOffset.UTC); in testAggregateLocalFilter_daysPeriod()
|
D | StepsRecordTest.java | 85 import java.time.LocalDateTime; 289 LocalDateTime recordTime = LocalDateTime.now(ZoneOffset.MIN); in testReadStepsRecordUsingFilters_timeFilterLocal() 498 LocalDateTime recordTime = LocalDateTime.now(ZoneOffset.MIN).minus(10, ChronoUnit.SECONDS); in testReadStepsRecordUsingFiltersLocal_withPageSize() 548 LocalDateTime recordTime = LocalDateTime.now(ZoneOffset.MIN); in testDeleteStepsRecord_time_filters_local() 1185 LocalDateTime startLocalTime = in testAggregateGroupByMonthPeriod_slicedCorrectly() 1186 LocalDateTime.ofInstant(Instant.ofEpochMilli(startTime.toEpochMilli()), UTC); in testAggregateGroupByMonthPeriod_slicedCorrectly() 1188 LocalDateTime endLocalTime = in testAggregateGroupByMonthPeriod_slicedCorrectly() 1189 LocalDateTime.ofInstant(Instant.ofEpochMilli(endTime.toEpochMilli()), UTC); in testAggregateGroupByMonthPeriod_slicedCorrectly() 1253 LocalDateTime endTimeLocal = LocalDateTime.now(offset); in testAggregationLocalTimeOffset() 1254 LocalDateTime startTimeLocal = endTimeLocal.minusDays(4); in testAggregationLocalTimeOffset() [all …]
|
/packages/modules/HealthFitness/framework/java/android/health/connect/aidl/ |
D | AggregateDataResponseParcel.java | 41 import java.time.LocalDateTime; 189 LocalDateTime startTime, LocalDateTime endTime) { in getAggregateDataResponseForLocalTimeGroupedByDuration() 244 LocalDateTime groupBoundary = ((LocalTimeRangeFilter) mTimeRangeFilter).getStartTime(); in getAggregateDataResponseGroupedByPeriod() 335 private LocalDateTime getPeriodEndLocalDateTime(TimeRangeFilter timeRangeFilter) { in getPeriodEndLocalDateTime() 337 return LocalDateTime.ofInstant( in getPeriodEndLocalDateTime()
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/utils/ |
D | TimeExtensions.kt | 22 import java.time.LocalDateTime 52 fun Instant.toLocalDateTime(): LocalDateTime { in Instant() 102 fun LocalDateTime.toInstant(): Instant { in LocalDateTime() method
|
D | TimeSource.kt | 19 import java.time.LocalDateTime 28 fun currentLocalDateTime(): LocalDateTime
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | Dates.java | 28 import java.time.LocalDateTime; 272 LocalDateTime dateTime1 = LocalDateTime.ofInstant(Instant.ofEpochMilli(date1), in getNumberOfDaysPassed() 274 LocalDateTime dateTime2 = LocalDateTime.ofInstant(Instant.ofEpochMilli(date2), in getNumberOfDaysPassed()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | Shared.java | 54 import java.time.LocalDateTime; 195 LocalDateTime then = LocalDateTime.ofInstant(Instant.ofEpochMilli(when), zoneId); in formatTime() 196 LocalDateTime now = LocalDateTime.ofInstant(Instant.now(), zoneId); in formatTime()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/readdata/ |
D | ReadByFilterTests.java | 55 import java.time.LocalDateTime; 227 LocalDateTime filterStartTime = LocalDateTime.now(defaultZone).minusDays(1); in filterByTimeRange_localTime_returnsDataWithinRange() 228 LocalDateTime filterEndTime = filterStartTime.plusHours(6); in filterByTimeRange_localTime_returnsDataWithinRange() 268 private static Instant toInstant(LocalDateTime time) { in toInstant()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/remoteaccess/ |
D | KitchenSinkRemoteTaskService.java | 42 import java.time.LocalDateTime; 184 private static String formatTime(LocalDateTime t) { in formatTime() 190 LocalDateTime taskTime = LocalDateTime.now(ZoneId.systemDefault()); in toJsonString()
|