Home
last modified time | relevance | path

Searched refs:toInstant (Results 1 – 25 of 60) sorted by relevance

123

/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/safetylabel/
DTestSafetyLabels.kt33 val DATE_2022_09_01: Instant = ZonedDateTime.parse("2022-09-01T00:00:00.000Z").toInstant()
34 val DATE_2022_10_10: Instant = ZonedDateTime.parse("2022-10-10T00:00:00.000Z").toInstant()
35 val DATE_2022_10_12: Instant = ZonedDateTime.parse("2022-10-12T00:00:00.000Z").toInstant()
36 val DATE_2022_10_14: Instant = ZonedDateTime.parse("2022-10-14T00:00:00.000Z").toInstant()
37 val DATE_2022_12_10: Instant = ZonedDateTime.parse("2022-12-10T00:00:00.000Z").toInstant()
38 val DATE_2022_12_30: Instant = ZonedDateTime.parse("2022-12-30T00:00:00.000Z").toInstant()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/utils/
DTimeExtensions.kt37 return date.atTime(LocalTime.MIDNIGHT).atZone(ZoneId.systemDefault()).toInstant() in getInstant()
40 fun Long.toInstant(): Instant { in Long() method
75 return this.toLocalDate().atStartOfDay(ZoneId.systemDefault()).toInstant() in atStartOfDay()
85 return this.atStartOfDay(ZoneId.systemDefault()).toInstant() in toInstantAtStartOfDay()
102 fun LocalDateTime.toInstant(): Instant { in LocalDateTime() method
103 return atZone(ZoneId.systemDefault()).toInstant() in LocalDateTime()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/readdata/
DReadByFilterTests.java233 toInstant(filterStartTime), in filterByTimeRange_localTime_returnsDataWithinRange()
234 toInstant(filterStartTime.plusHours(2)), in filterByTimeRange_localTime_returnsDataWithinRange()
238 toInstant(filterEndTime.minusHours(2)), in filterByTimeRange_localTime_returnsDataWithinRange()
239 toInstant(filterEndTime), in filterByTimeRange_localTime_returnsDataWithinRange()
243 toInstant(filterStartTime).minusMillis(1), in filterByTimeRange_localTime_returnsDataWithinRange()
244 toInstant(filterStartTime), in filterByTimeRange_localTime_returnsDataWithinRange()
248 toInstant(filterEndTime), in filterByTimeRange_localTime_returnsDataWithinRange()
249 toInstant(filterEndTime).plusMillis(1), in filterByTimeRange_localTime_returnsDataWithinRange()
268 private static Instant toInstant(LocalDateTime time) { in toInstant() method in ReadByFilterTests
269 return time.atZone(ZoneId.systemDefault()).toInstant(); in toInstant()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/data/entries/datenavigation/
DDateNavigationView.kt105 selectedDate.atZone(ZoneId.systemDefault()).plus(toPeriod(period)).toInstant() in bindNextDayButton()
116 selectedDate.atZone(ZoneId.systemDefault()).minus(toPeriod(period)).toInstant() in bindPreviousDayButton()
173 .toInstant() in updateDisplayedDates()
188 .toInstant() in updateDisplayedDates()
201 .toInstant() in getDisplayedStartDate()
212 .toInstant() in getDisplayedStartDate()
223 .toInstant() in getDisplayedStartDate()
DDatePickerSpinnerAdapter.kt110 .toInstant() in maybeReplaceWithTemporalDeixis()
115 .toInstant() in maybeReplaceWithTemporalDeixis()
/packages/modules/HealthFitness/framework/java/android/health/connect/
DTimeRangeFilterHelper.java79 return time.toInstant(LOCAL_TIME_ZERO_OFFSET).toEpochMilli(); in getMillisOfLocalTime()
89 ? time.toInstant(zoneOffset) in getInstantFromLocalTime()
90 : time.toInstant(ZoneOffset.systemDefault().getRules().getOffset(time)); in getInstantFromLocalTime()
/packages/modules/Connectivity/thread/tests/cts/src/android/net/thread/cts/
DOperationalDatasetTimestampTest.java76 assertThat(new OperationalDatasetTimestamp(100L, 32767, false).toInstant().getNano()) in toInstant_nanosIsRounded()
80 assertThat(new OperationalDatasetTimestamp(100L, 32766, false).toInstant().getNano()) in toInstant_nanosIsRounded()
90 OperationalDatasetTimestamp.fromInstant(timestamp1.toInstant()); in toInstant_onlyAuthoritativeSourceDiscarded()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/
DDateNavigationView.kt36 import com.android.healthconnect.controller.utils.toInstant in <lambda>()
59 private var selectedDate: Instant = timeSource.currentTimeMillis().toInstant() in <lambda>()
61 private var maxDate: Instant? = timeSource.currentTimeMillis().toInstant() in <lambda>()
121 setMaxDate(datePickerDialog.datePicker.maxDate.toInstant()) in <lambda>()
DLoadMenstruationDataUseCase.kt72 .toInstant() in <lambda>()
107 .toInstant() in <lambda>()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/data/entries/api/
DLoadEntriesHelper.kt154 .toInstant() in <lambda>()
160 .toInstant() in <lambda>()
214 .toInstant() in <lambda>()
215 var end = start.atZone(ZoneId.systemDefault()).plus(toPeriod(period)).toInstant() in <lambda>()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/deletion/
DDeletionConfirmationDialogFragment.kt30 import com.android.healthconnect.controller.utils.toInstant in <lambda>()
161 dateFormatter.formatLongDate(deletionParameters.startTimeMs.toInstant()), in <lambda>()
162 dateFormatter.formatLongDate(deletionParameters.endTimeMs.toInstant())) + in <lambda>()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DMultipathPolicyTrackerTest.java196 when(mClock.millis()).thenReturn(now.toInstant().toEpochMilli()); in prepareGetMultipathPreferenceTest()
197 when(mClock.instant()).thenReturn(now.toInstant()); in prepareGetMultipathPreferenceTest()
238 eq(cycleOfTheMonth.getLower().toInstant().toEpochMilli()), in prepareGetMultipathPreferenceTest()
239 eq(cycleOfTheMonth.getUpper().toInstant().toEpochMilli()))) in prepareGetMultipathPreferenceTest()
254 eq(startOfDay.toInstant().toEpochMilli()), in prepareGetMultipathPreferenceTest()
255 eq(now.toInstant().toEpochMilli()))).thenReturn(mockedStatsBucket); in prepareGetMultipathPreferenceTest()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/util/
DDateTimeUtilsTest.java40 FAKE_DATE.atStartOfDay().toInstant(ZoneOffset.UTC).toEpochMilli();
195 return when.atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli(); in generateDateTimeMillis()
200 .toInstant().toEpochMilli(); in generateDateTimeMillisAt()
/packages/apps/Settings/src/com/android/settings/datausage/lib/
DNetworkCycleDataRepository.kt64 Range(it.lower.toInstant().toEpochMilli(), it.upper.toInstant().toEpochMilli()) in queryUsage()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/mapclient/obex/
DObexTime.java97 mInstant = builder.build().toInstant(); in ObexTime()
102 mInstant = date.toInstant(); in ObexTime()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utiltests/
DTimeExtensionsTest.kt25 import com.android.healthconnect.controller.utils.toInstant
53 assertThat(testLong.toInstant()).isEqualTo(Instant.ofEpochMilli(testLong)) in longToInstant_returnsCorrectInstant()
218 assertThat(testLocalDateTime.toInstant()).isEqualTo(expectedInstant) in localDateTimeToInstant_returnsCorrectInstant()
/packages/modules/Connectivity/thread/framework/java/android/net/thread/
DOperationalDatasetTimestamp.java84 public Instant toInstant() { in toInstant() method in OperationalDatasetTimestamp
190 .append(toInstant()) in toString()
/packages/modules/OnDevicePersonalization/tests/chronicletests/src/com/android/libraries/pcc/chronicle/test/
DChronicleApiStorageTest.kt25 import com.android.libraries.pcc.chronicle.api.storage.toInstant
49 val instant1 = timestamp1.toInstant() in testTimestampToInstant()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/
DTestConstants.kt58 import com.android.healthconnect.controller.utils.toInstant in <lambda>()
98 val endTime = startTime.toLocalDateTime().plusHours(8).toInstant() in getSleepSessionRecord()
384 val instantToday: Instant = timeSource.currentLocalDateTime().toInstant() in getMixedRecordsAcrossTwoDays()
385 val instantYesterday: Instant = timeSource.currentLocalDateTime().minusDays(1).toInstant() in getMixedRecordsAcrossTwoDays()
394 val instantTwoDaysAgo: Instant = timeSource.currentLocalDateTime().minusDays(2).toInstant() in getMixedRecordsAcrossThreeDays()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/
DTimeRangeFilterTest.java96 assertThat(timeRangeFilter.getStartTime().toInstant(ZoneOffset.MAX)) in testStartTimeLocalRangeFilter_startTimeNull()
106 timeRangeFilter.getEndTime().toInstant(ZoneOffset.MAX).toEpochMilli() in testEndTimeLocalRangeFilter_endTimeNull()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/datasources/api/
DSleepSessionHelper.kt119 .toInstant() in <lambda>()
165 .toInstant() in <lambda>()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/
DStepsRecordTest.java296 getBaseStepsRecord(recordTime.toInstant(ZoneOffset.MIN), ZoneOffset.MIN, 50); in testReadStepsRecordUsingFilters_timeFilterLocal()
312 recordTime.minus(1, ChronoUnit.SECONDS).toInstant(ZoneOffset.MIN)) in testReadStepsRecordUsingFilters_timeFilterLocal()
314 recordTime.plus(1, ChronoUnit.SECONDS).toInstant(ZoneOffset.MIN)) in testReadStepsRecordUsingFilters_timeFilterLocal()
507 recordTime.plus(1, ChronoUnit.SECONDS).toInstant(ZoneOffset.MIN), in testReadStepsRecordUsingFiltersLocal_withPageSize()
511 recordTime.toInstant(ZoneOffset.MIN), ZoneOffset.MIN, 50), in testReadStepsRecordUsingFiltersLocal_withPageSize()
513 recordTime.minus(1, ChronoUnit.SECONDS).toInstant(ZoneOffset.MIN), in testReadStepsRecordUsingFiltersLocal_withPageSize()
557 recordTime.toInstant(ZoneOffset.MIN), ZoneOffset.MIN, 50)); in testDeleteStepsRecord_time_filters_local()
561 recordTime.toInstant(ZoneOffset.MAX).plusMillis(1999), in testDeleteStepsRecord_time_filters_local()
567 recordTime.toInstant(ZoneOffset.MAX).plusSeconds(2), in testDeleteStepsRecord_time_filters_local()
1190 Instant bucketBoundary = startLocalTime.plusMonths(1).toInstant(UTC); in testAggregateGroupByMonthPeriod_slicedCorrectly()
[all …]
DExerciseSessionRecordTest.java451 now.toInstant(ZoneOffset.MIN), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
452 now.toInstant(ZoneOffset.MIN).plusSeconds(1), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
457 now.toInstant(ZoneOffset.MAX).plusMillis(1999), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
458 now.toInstant(ZoneOffset.MAX).plusSeconds(3), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
463 now.toInstant(ZoneOffset.MAX).plusSeconds(2), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
464 now.toInstant(ZoneOffset.MAX).plusSeconds(3), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
/packages/modules/ConfigInfrastructure/service/java/com/android/server/deviceconfig/
DBootNotificationCreator.java119 .toInstant() in onPropertiesChanged()
203 .toInstant() in tryAgainIn24Hours()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/autodelete/
DAutoDeleteRange.kt66 .toInstant() in autoDeleteRangeEnd()

123