/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/ |
D | SleepSessionRecordTest.java | 41 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/ |
D | SleepSessionFormatter.kt | 17 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/ |
D | SleepDurationAggregationTest.java | 19 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 …]
|
D | AggregateOtherAppsDataTest.java | 43 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/ |
D | SleepStageInternal.java | 20 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()
|
D | SleepSessionRecordInternal.java | 23 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/ |
D | SleepSessionFormatterTest.kt | 20 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/ |
D | SleepStageInternalTest.java | 21 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()
|
D | SleepSessionInternalTest.java | 21 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()
|
D | TestUtils.java | 24 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/ |
D | SleepSessionRecord.java | 48 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/ |
D | SessionDatatypeDisabledFeatureTest.java | 30 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/ |
D | TestConstants.kt | 38 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/ |
D | DataFactory.java | 45 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/ |
D | ListInputField.kt | 28 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/ |
D | LoadEntriesHelperUseCaseTest.kt | 31 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/ |
D | ReadByIdTests.java | 33 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/ |
D | SleepSessionHelper.kt | 5 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/ |
D | HealthDataEntryDetailsFormatter.kt | 28 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/ |
D | DeletePermissionTypesFromAppUseCaseTest.kt | 26 import android.health.connect.datatypes.SleepSessionRecord in <lambda>() 94 SleepSessionRecord::class.java, in <lambda>()
|
D | DeletePermissionTypesUseCaseTest.kt | 25 import android.health.connect.datatypes.SleepSessionRecord in <lambda>() 90 SleepSessionRecord::class.java, in <lambda>()
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/shared/ |
D | DataType.kt | 51 import android.health.connect.datatypes.SleepSessionRecord 94 SLEEP(SleepSessionRecord::class.java),
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/nopermission/ |
D | HealthConnectManagerNotAllPermissionsAreGrantedTest.java | 48 import android.health.connect.datatypes.SleepSessionRecord; 153 .addRecordType(SleepSessionRecord.class) in testGetChangeLogs_somePermissionsAreNotGranted_expectError()
|
D | HealthConnectManagerNoPermissionsGrantedTest.java | 28 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/ |
D | BundleHelper.java | 40 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()
|