Home
last modified time | relevance | path

Searched refs:SleepSessionRecord (Results 1 – 25 of 39) sorted by relevance

12

/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/
DSleepSessionRecordTest.java41 import android.health.connect.datatypes.SleepSessionRecord;
76 SleepSessionRecord.class, in tearDown()
86 new SleepSessionRecord.Stage( in testSleepStage_startTimeLaterThanEnd_throwsException()
87 END_TIME, START_TIME, SleepSessionRecord.StageType.STAGE_TYPE_AWAKE); in testSleepStage_startTimeLaterThanEnd_throwsException()
93 SleepSessionRecord.Stage stage1 = in testSleepStage_buildStage_equalsIsCorrect()
94 new SleepSessionRecord.Stage( in testSleepStage_buildStage_equalsIsCorrect()
95 START_TIME, END_TIME, SleepSessionRecord.StageType.STAGE_TYPE_AWAKE); in testSleepStage_buildStage_equalsIsCorrect()
96 SleepSessionRecord.Stage stage2 = in testSleepStage_buildStage_equalsIsCorrect()
97 new SleepSessionRecord.Stage( in testSleepStage_buildStage_equalsIsCorrect()
98 START_TIME, END_TIME, SleepSessionRecord.StageType.STAGE_TYPE_AWAKE); in testSleepStage_buildStage_equalsIsCorrect()
[all …]
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/
DSleepSessionFormatter.kt17 import android.health.connect.datatypes.SleepSessionRecord in <lambda>()
18 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_AWAKE in <lambda>()
19 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_AWAKE_IN_BED in <lambda>()
20 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_AWAKE_OUT_OF_BED in <lambda>()
21 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING in <lambda>()
22 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_DEEP in <lambda>()
23 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_LIGHT in <lambda>()
24 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_REM in <lambda>()
25 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_UNKNOWN in <lambda>()
43 BaseFormatter<SleepSessionRecord>(context), in <lambda>()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/
DSleepDurationAggregationTest.java19 import static android.health.connect.datatypes.SleepSessionRecord.SLEEP_DURATION_TOTAL;
36 import android.health.connect.datatypes.SleepSessionRecord;
77 SleepSessionRecord.class, in tearDown()
87 SleepSessionRecord session = in testSimpleAggregation_oneSession_returnsItsDuration()
88 new SleepSessionRecord.Builder( in testSimpleAggregation_oneSession_returnsItsDuration()
107 SleepSessionRecord.Stage awakeStage = in testSimpleAggregation_oneSessionWithAwake_returnsDurationMinusAwake()
108 new SleepSessionRecord.Stage( in testSimpleAggregation_oneSessionWithAwake_returnsDurationMinusAwake()
111 SleepSessionRecord.StageType.STAGE_TYPE_AWAKE); in testSimpleAggregation_oneSessionWithAwake_returnsDurationMinusAwake()
112 SleepSessionRecord session = in testSimpleAggregation_oneSessionWithAwake_returnsDurationMinusAwake()
113 new SleepSessionRecord.Builder( in testSimpleAggregation_oneSessionWithAwake_returnsDurationMinusAwake()
[all …]
DAggregateOtherAppsDataTest.java43 import android.health.connect.datatypes.SleepSessionRecord;
139 SleepSessionRecord sleepSessionRecord = buildSleepSessionWithEmptyMetadata(); in testAppWithReadPerms_aggregateOtherAppsSleep_expectSuccess()
143 SleepSessionRecord.SLEEP_DURATION_TOTAL, in testAppWithReadPerms_aggregateOtherAppsSleep_expectSuccess()
/packages/modules/HealthFitness/framework/java/android/health/connect/internal/datatypes/
DSleepStageInternal.java20 import android.health.connect.datatypes.SleepSessionRecord;
38 @SleepSessionRecord.StageType.StageTypes private int mStageType;
62 static List<SleepSessionRecord.Stage> getExternalStages( in getExternalStages()
64 List<SleepSessionRecord.Stage> externalStages = new ArrayList<>(internalStages.size()); in getExternalStages()
88 public SleepSessionRecord.Stage toExternalRecord() { in toExternalRecord()
89 return new SleepSessionRecord.Stage( in toExternalRecord()
118 @SleepSessionRecord.StageType.StageTypes
124 public SleepStageInternal setStageType(@SleepSessionRecord.StageType.StageTypes int stageType) { in setStageType()
DSleepSessionRecordInternal.java23 import android.health.connect.datatypes.SleepSessionRecord;
35 public final class SleepSessionRecordInternal extends IntervalRecordInternal<SleepSessionRecord> {
109 public SleepSessionRecord toExternalRecord() { in toExternalRecord()
110 SleepSessionRecord.Builder builder = in toExternalRecord()
111 new SleepSessionRecord.Builder(buildMetaData(), getStartTime(), getEndTime()); in toExternalRecord()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/formatters/
DSleepSessionFormatterTest.kt20 import android.health.connect.datatypes.SleepSessionRecord
21 import android.health.connect.datatypes.SleepSessionRecord.Stage
22 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_AWAKE
23 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_AWAKE_IN_BED
24 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_AWAKE_OUT_OF_BED
25 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING
26 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_DEEP
27 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_LIGHT
28 import android.health.connect.datatypes.SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_REM
190 ): SleepSessionRecord { in getRecord()
[all …]
/packages/modules/HealthFitness/tests/unittests/src/android/healthconnect/internal/datatypes/
DSleepStageInternalTest.java21 import android.health.connect.datatypes.SleepSessionRecord;
36 SleepSessionRecord.Stage external = in testSleepStageInternal_convertToExternalAndBack_recordsAreEqual()
37 new SleepSessionRecord.Stage( in testSleepStageInternal_convertToExternalAndBack_recordsAreEqual()
38 mStartTime, mEndTime, SleepSessionRecord.StageType.STAGE_TYPE_AWAKE); in testSleepStageInternal_convertToExternalAndBack_recordsAreEqual()
39 SleepSessionRecord.Stage converted = external.toInternalStage().toExternalRecord(); in testSleepStageInternal_convertToExternalAndBack_recordsAreEqual()
56 .setStageType(SleepSessionRecord.StageType.STAGE_TYPE_AWAKE_IN_BED); in testSleepStageInternal_writeToParcelAndBack_recordsAreEqual()
DSleepSessionInternalTest.java21 import android.health.connect.datatypes.SleepSessionRecord;
34 SleepSessionRecord externalSession = session.toExternalRecord(); in testSessionConvertToExternal_convertToExternal_fieldsIsEqual()
41 SleepSessionRecord externalSession = session.toExternalRecord(); in testSessionConvertToExternal_convertToExternalNoExtra_fieldsIsEqual()
72 SleepSessionRecord external, SleepSessionRecordInternal internal) { in assertFieldsAreEqual()
104 List<SleepStageInternal> internal, List<SleepSessionRecord.Stage> external) { in assertStagesAreEqual()
113 SleepSessionRecord.Stage externalStage = external.get(i); in assertStagesAreEqual()
DTestUtils.java24 import android.health.connect.datatypes.SleepSessionRecord;
163 .setStageType(SleepSessionRecord.StageType.STAGE_TYPE_AWAKE_OUT_OF_BED); in buildSleepStage()
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/
DSleepSessionRecord.java48 public final class SleepSessionRecord extends IntervalRecord { class
80 private SleepSessionRecord( in SleepSessionRecord() method in SleepSessionRecord
129 if (!(o instanceof SleepSessionRecord)) return false; in equals()
131 SleepSessionRecord that = (SleepSessionRecord) o; in equals()
391 public SleepSessionRecord buildWithoutValidation() { in buildWithoutValidation()
392 return new SleepSessionRecord( in buildWithoutValidation()
406 public SleepSessionRecord build() { in build()
407 return new SleepSessionRecord( in build()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/
DSessionDatatypeDisabledFeatureTest.java30 import android.health.connect.datatypes.SleepSessionRecord;
65 TestUtils.verifyDeleteRecords(SleepSessionRecord.class, mFilterAll); in tearDown()
117 ReadRecordsRequestUsingIds.Builder<SleepSessionRecord> request = in testReadSleepSession_insertAndRead_sessionIsNotAvailable()
118 new ReadRecordsRequestUsingIds.Builder<>(SleepSessionRecord.class); in testReadSleepSession_insertAndRead_sessionIsNotAvailable()
120 List<SleepSessionRecord> readRecords = TestUtils.readRecords(request.build()); in testReadSleepSession_insertAndRead_sessionIsNotAvailable()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/
DTestConstants.kt38 import android.health.connect.datatypes.SleepSessionRecord in <lambda>()
97 fun getSleepSessionRecord(startTime: Instant = NOW): SleepSessionRecord { in getSleepSessionRecord()
99 return SleepSessionRecord.Builder(getMetaData(), startTime, endTime).build() in getSleepSessionRecord()
102 fun getSleepSessionRecord(startTime: Instant, endTime: Instant): SleepSessionRecord { in getSleepSessionRecord()
103 return SleepSessionRecord.Builder(getMetaData(), startTime, endTime).build() in getSleepSessionRecord()
255 fun getSleepSessionRecords(inputDates: List<Pair<Instant, Instant>>): List<SleepSessionRecord> { in getDataOrigin()
256 val result = arrayListOf<SleepSessionRecord>() in getDataOrigin()
258 result.add(SleepSessionRecord.Builder(getMetaData(), startTime, endTime).build()) in getDataOrigin()
264 fun verifySleepSessionListsEqual(actual: List<Record>, expected: List<SleepSessionRecord>) { in verifySleepSessionListsEqual()
267 assertThat(element is SleepSessionRecord).isTrue() in verifySleepSessionListsEqual()
[all …]
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DDataFactory.java45 import android.health.connect.datatypes.SleepSessionRecord;
158 public static SleepSessionRecord buildSleepSession() { in buildSleepSession()
163 public static SleepSessionRecord buildSleepSessionWithClientId(String clientId) { in buildSleepSessionWithClientId()
168 public static SleepSessionRecord buildSleepSessionWithEmptyMetadata() { in buildSleepSessionWithEmptyMetadata()
173 public static SleepSessionRecord buildSleepSession(Metadata metadata) { in buildSleepSession()
174 return new SleepSessionRecord.Builder(metadata, SESSION_START_TIME, SESSION_END_TIME) in buildSleepSession()
179 new SleepSessionRecord.Stage( in buildSleepSession()
182 SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_LIGHT), in buildSleepSession()
183 new SleepSessionRecord.Stage( in buildSleepSession()
186 SleepSessionRecord.StageType.STAGE_TYPE_SLEEPING_REM), in buildSleepSession()
[all …]
/packages/modules/HealthFitness/testapps/toolbox/src/com/android/healthconnect/testapps/toolbox/fieldviews/
DListInputField.kt28 import android.health.connect.datatypes.SleepSessionRecord
97 SleepSessionRecord.Stage::class.java -> { in addRow()
102 getStaticFieldNamesAndValues(SleepSessionRecord.StageType::class)) in addRow()
172 SleepSessionRecord.Stage::class.java -> { in getFieldValue()
174 SleepSessionRecord.Stage( in getFieldValue()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/data/entries/api/
DLoadEntriesHelperUseCaseTest.kt31 import android.health.connect.datatypes.SleepSessionRecord in <lambda>()
123 ArgumentCaptor<ReadRecordsRequestUsingFilters<SleepSessionRecord>> in <lambda>()
167 sleepSessionRequestCaptor, timeRangeFilter, SleepSessionRecord::class.java) in <lambda>()
187 sleepSessionRequestCaptor, timeRangeFilter, SleepSessionRecord::class.java) in <lambda>()
208 sleepSessionRequestCaptor, timeRangeFilter, SleepSessionRecord::class.java) in <lambda>()
495 ): (InvocationOnMock) -> ReadRecordsResponse<SleepSessionRecord> { in <lambda>()
498 args.arguments[2] as OutcomeReceiver<ReadRecordsResponse<SleepSessionRecord>, *> in <lambda>()
536 ): ReadRecordsResponse<SleepSessionRecord> { in <lambda>()
539 return ReadRecordsResponse<SleepSessionRecord>( in <lambda>()
542 return ReadRecordsResponse<SleepSessionRecord>( in <lambda>()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/readdata/
DReadByIdTests.java33 import android.health.connect.datatypes.SleepSessionRecord;
99 ReadRecordsRequestUsingIds.Builder<SleepSessionRecord> requestBuilder = in readDataById_nullId_throws()
100 new ReadRecordsRequestUsingIds.Builder<>(SleepSessionRecord.class); in readDataById_nullId_throws()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/datasources/api/
DSleepSessionHelper.kt5 import android.health.connect.datatypes.SleepSessionRecord in <lambda>()
190 ): List<SleepSessionRecord> { in <lambda>()
194 return result.data.map { it as SleepSessionRecord } in <lambda>()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/shared/
DHealthDataEntryDetailsFormatter.kt28 import android.health.connect.datatypes.SleepSessionRecord
60 is SleepSessionRecord -> sleepSessionFormatter.formatRecordDetails(record) in formatDetails()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/selectabledeletion/api/
DDeletePermissionTypesFromAppUseCaseTest.kt26 import android.health.connect.datatypes.SleepSessionRecord in <lambda>()
94 SleepSessionRecord::class.java, in <lambda>()
DDeletePermissionTypesUseCaseTest.kt25 import android.health.connect.datatypes.SleepSessionRecord in <lambda>()
90 SleepSessionRecord::class.java, in <lambda>()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/shared/
DDataType.kt51 import android.health.connect.datatypes.SleepSessionRecord
94 SLEEP(SleepSessionRecord::class.java),
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/nopermission/
DHealthConnectManagerNotAllPermissionsAreGrantedTest.java48 import android.health.connect.datatypes.SleepSessionRecord;
153 .addRecordType(SleepSessionRecord.class) in testGetChangeLogs_somePermissionsAreNotGranted_expectError()
DHealthConnectManagerNoPermissionsGrantedTest.java28 import static android.health.connect.datatypes.SleepSessionRecord.SLEEP_DURATION_TOTAL;
70 import android.health.connect.datatypes.SleepSessionRecord;
191 new Pair<>(READ_SLEEP, SleepSessionRecord.class), in testGetChangeLogs_noPermissions_expectError()
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/libs/HealthConnectTestLib/src/android/healthconnect/cts/lib/
DBundleHelper.java40 import android.health.connect.datatypes.SleepSessionRecord;
41 import android.health.connect.datatypes.SleepSessionRecord.Stage;
428 } else if (record instanceof SleepSessionRecord sleepSessionRecord) { in fromRecord()
485 } else if (Objects.equals(recordClassName, SleepSessionRecord.class.getName())) { in toRecord()
748 private static Bundle getSleepRecordValues(SleepSessionRecord record) { in getSleepRecordValues()
827 private static SleepSessionRecord createSleepSessionRecord( in createSleepSessionRecord()
845 return new SleepSessionRecord.Builder(metadata, startTime, endTime) in createSleepSessionRecord()

12