Home
last modified time | relevance | path

Searched refs:StepsRecord (Results 1 – 25 of 74) sorted by relevance

123

/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/
DStepsRecordTest.java20 import static android.health.connect.datatypes.StepsRecord.STEPS_COUNT_TOTAL;
66 import android.health.connect.datatypes.StepsRecord;
118 StepsRecord.class, in tearDown()
141 (StepsRecord) records.get(1), (StepsRecord) records.get(0)))); in testUpdateStepsRecordToDuplicate()
161 ReadRecordsRequestUsingIds<StepsRecord> request = in testReadStepsRecord_invalidIds()
162 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testReadStepsRecord_invalidIds()
165 assertThat(request.getRecordType()).isEqualTo(StepsRecord.class); in testReadStepsRecord_invalidIds()
167 List<StepsRecord> result = TestUtils.readRecords(request); in testReadStepsRecord_invalidIds()
180 ReadRecordsRequestUsingIds<StepsRecord> request = in testReadStepsRecord_invalidClientRecordIds()
181 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testReadStepsRecord_invalidClientRecordIds()
[all …]
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/device/src/android/healthconnect/cts/device/
DHealthConnectChangeLogsDeviceTests.java33 import android.health.connect.datatypes.StepsRecord;
76 StepsRecord.class, new TimeInstantRangeFilter.Builder().setEndTime(NOW).build()); in tearDown()
85 .addRecordType(StepsRecord.class) in testChangeLogs_insert_multipleApps_noFilter_returnsUpsertLogsForAllApps()
91 StepsRecord recordInsertedByAppA = in testChangeLogs_insert_multipleApps_noFilter_returnsUpsertLogsForAllApps()
94 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testChangeLogs_insert_multipleApps_noFilter_returnsUpsertLogsForAllApps()
98 StepsRecord recordInsertedByAppB = in testChangeLogs_insert_multipleApps_noFilter_returnsUpsertLogsForAllApps()
101 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testChangeLogs_insert_multipleApps_noFilter_returnsUpsertLogsForAllApps()
118 .addRecordType(StepsRecord.class) in testChangeLogs_insert_multipleApps_filterDataOrigin_returnsUpsertLogs()
130 StepsRecord recordInsertedByAppA = in testChangeLogs_insert_multipleApps_filterDataOrigin_returnsUpsertLogs()
133 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testChangeLogs_insert_multipleApps_filterDataOrigin_returnsUpsertLogs()
[all …]
DHealthConnectDeviceTest.java22 import static android.health.connect.datatypes.StepsRecord.STEPS_COUNT_TOTAL;
90 import android.health.connect.datatypes.StepsRecord;
150 private static final StepsRecord STEPS_1000 =
156 private static final StepsRecord STEPS_2000 =
191 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAppWithNormalReadWritePermCanInsertRecord()
197 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAnAppCantDeleteAnotherAppEntry()
199 RecordIdFilter recordIdFilter = RecordIdFilter.fromId(StepsRecord.class, recordId); in testAnAppCantDeleteAnotherAppEntry()
211 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAnAppCantUpdateAnotherAppEntry()
213 StepsRecord updatedRecord = getStepsRecord(getMetadataForId(recordId)); in testAnAppCantUpdateAnotherAppEntry()
246 StepsRecord record = getStepsRecord(getEmptyMetadata()); in testAppWithWritePermsOnly_readOwnData_success()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/readdata/
DReadByFilterTests.java42 import android.health.connect.datatypes.StepsRecord;
98 ReadRecordsRequest<StepsRecord> stepsRequest = in filterByDataType_dataOfOtherTypesExcluded()
99 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class).build(); in filterByDataType_dataOfOtherTypesExcluded()
100 List<StepsRecord> stepsRecords = readRecords(stepsRequest); in filterByDataType_dataOfOtherTypesExcluded()
131 ReadRecordsRequest<StepsRecord> ownDataRequest = in filterByDataOrigin_dataOfOtherOriginsExcluded()
132 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in filterByDataOrigin_dataOfOtherOriginsExcluded()
135 List<StepsRecord> stepsRecords = readRecords(ownDataRequest); in filterByDataOrigin_dataOfOtherOriginsExcluded()
139 ReadRecordsRequest<StepsRecord> testAppDataRequest = in filterByDataOrigin_dataOfOtherOriginsExcluded()
140 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in filterByDataOrigin_dataOfOtherOriginsExcluded()
160 ReadRecordsRequest<StepsRecord> request = in filterByDataOrigin_noFilterSet_allDataReturned()
[all …]
DOrderingTests.java37 import android.health.connect.datatypes.StepsRecord;
123 ReadRecordsRequest<StepsRecord> request = in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder()
124 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class).build(); in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder()
126 List<StepsRecord> records = readRecords(request); in ordering_ascendingNotSet_sortedByStartTimeInAscendingOrder()
143 ReadRecordsRequest<StepsRecord> descendingRequest = in ordering_sameStartTime_sortedByRowIdAscending()
144 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in ordering_sameStartTime_sortedByRowIdAscending()
147 List<StepsRecord> descendingRecords = readRecords(descendingRequest); in ordering_sameStartTime_sortedByRowIdAscending()
153 ReadRecordsRequest<StepsRecord> ascendingRequest = in ordering_sameStartTime_sortedByRowIdAscending()
154 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in ordering_sameStartTime_sortedByRowIdAscending()
158 List<StepsRecord> ascendingRecords = readRecords(ascendingRequest); in ordering_sameStartTime_sortedByRowIdAscending()
[all …]
DPaginationTests.java40 import android.health.connect.datatypes.StepsRecord;
146 ReadRecordsRequest<StepsRecord> request1 = in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly()
147 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly()
150 ReadRecordsResponse<StepsRecord> page1 = getReadRecordsResponse(request1); in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly()
155 ReadRecordsRequest<StepsRecord> request2 = in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly()
156 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly()
160 ReadRecordsResponse<StepsRecord> page2 = getReadRecordsResponse(request2); in readAllData_multiplePagesSameStartTimeRecords_paginatedCorrectly()
224 ReadRecordsRequestUsingFilters.Builder<StepsRecord> request = in readRequest_pageSizeOutOfRange_throws()
225 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class); in readRequest_pageSizeOutOfRange_throws()
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DDataFactory.java46 import android.health.connect.datatypes.StepsRecord;
360 public static StepsRecord getStepsRecordWithEmptyMetaData() { in getStepsRecordWithEmptyMetaData()
364 public static StepsRecord getStepsRecord() { in getStepsRecord()
369 public static StepsRecord getStepsRecord(long steps) { in getStepsRecord()
374 public static StepsRecord getStepsRecord(long steps, String clientId) { in getStepsRecord()
379 public static StepsRecord getStepsRecord(long steps, Metadata metadata) { in getStepsRecord()
380 return new StepsRecord.Builder(metadata, NOW, NOW.plusMillis(1000), steps).build(); in getStepsRecord()
384 public static StepsRecord getStepsRecord(long steps, Instant start, Instant end) { in getStepsRecord()
385 return new StepsRecord.Builder(getEmptyMetadata(), start, end, steps).build(); in getStepsRecord()
389 public static StepsRecord getStepsRecord( in getStepsRecord()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/changelogs/
DHealthConnectChangeLogsTests.java65 import android.health.connect.datatypes.StepsRecord;
110 private static final Correspondence<StepsRecord, StepsRecord> STEPS_RECORD_CORRESPONDENCE =
138 new ChangeLogTokenRequest.Builder().addRecordType(StepsRecord.class).build(); in testGetChangeLogToken_hasFieldsSet()
140 assertThat(changeLogTokenRequest.getRecordTypes()).containsExactly(StepsRecord.class); in testGetChangeLogToken_hasFieldsSet()
177 .addRecordType(StepsRecord.class) in testGetChangeLogToken_superRecordTypes_throwsException()
353 .addRecordType(StepsRecord.class) in testChangeLogs_insert_filterRecordType_returnsUpsertedLogs()
359 StepsRecord stepsRecord = (StepsRecord) insertRecords(testRecords).get(0); in testChangeLogs_insert_filterRecordType_returnsUpsertedLogs()
391 StepsRecord stepsRecord = getStepsRecord(/* steps = */ 10, "stepsId"); in testChangeLogs_insertAndDeleteByClientId_returnsDeletedLogsOnly()
394 ImmutableList.of(RecordIdFilter.fromClientRecordId(StepsRecord.class, "stepsId"))); in testChangeLogs_insertAndDeleteByClientId_returnsDeletedLogsOnly()
411 StepsRecord stepsRecord45DaysAgo = getStepsRecord_minusDays(45); in testChangeLogs_insertOldRecords_onlyReturnsUpsertedLogsAfterHistoricalAccess()
[all …]
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/
DStepsRecord.java36 public final class StepsRecord extends IntervalRecord { class
104 public StepsRecord buildWithoutValidation() { in buildWithoutValidation()
105 return new StepsRecord( in buildWithoutValidation()
119 public StepsRecord build() { in build()
120 return new StepsRecord( in build()
145 private StepsRecord( in StepsRecord() method in StepsRecord
185 StepsRecord record = (StepsRecord) o; in equals()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/storage/request/
DReadTransactionRequestTest.java27 import android.health.connect.datatypes.StepsRecord;
51 ReadRecordsRequestUsingFilters<StepsRecord> readRecordsRequest = in createReadByFilterRequest_noPageToken_correctPaginationInfo()
52 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in createReadByFilterRequest_noPageToken_correctPaginationInfo()
68 ReadRecordsRequestUsingFilters<StepsRecord> readRecordsRequest = in createReadByFilterRequest_hasPageToken_correctPaginationInfo()
69 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in createReadByFilterRequest_hasPageToken_correctPaginationInfo()
83 ReadRecordsRequestUsingIds<StepsRecord> readRecordsRequest = in createReadByIdRequest_singleType_noPaginationInfo()
84 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in createReadByIdRequest_singleType_noPaginationInfo()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/recentaccess/
DRecentAccessViewModelTest.kt22 import android.health.connect.datatypes.StepsRecord in <lambda>()
143 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
149 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
226 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
230 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
239 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
245 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
306 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
310 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
359 dataTypeToCategory(StepsRecord::class.java).uppercaseTitle(), in <lambda>()
[all …]
/packages/modules/HealthFitness/framework/java/android/health/connect/internal/datatypes/
DStepsRecordInternal.java23 import android.health.connect.datatypes.StepsRecord;
31 public final class StepsRecordInternal extends IntervalRecordInternal<StepsRecord> {
47 public StepsRecord toExternalRecord() { in toExternalRecord()
48 return new StepsRecord.Builder(buildMetaData(), getStartTime(), getEndTime(), getCount()) in toExternalRecord()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/
DStepsFormatter.kt19 import android.health.connect.datatypes.StepsRecord
32 EntryFormatter<StepsRecord>(context), UnitFormatter<Long> {
35 record: StepsRecord, in formatValue()
42 record: StepsRecord, in formatA11yValue()
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/libs/HealthConnectTestLib/src/android/healthconnect/cts/lib/
DUiTestUtils.kt234 fun stepsRecordFromTestApp(): StepsRecord { in stepsRecordFromTestApp()
238 fun stepsRecordFromTestApp(stepCount: Long): StepsRecord { in stepsRecordFromTestApp()
242 fun stepsRecordFromTestApp(startTime: Instant): StepsRecord { in stepsRecordFromTestApp()
247 fun stepsRecordFromTestApp(stepCount: Long, startTime: Instant): StepsRecord { in stepsRecordFromTestApp()
251 fun stepsRecordFromTestApp2(): StepsRecord { in stepsRecordFromTestApp2()
267 private fun stepsRecord(packageName: String, stepCount: Long): StepsRecord { in stepsRecord()
276 ): StepsRecord { in stepsRecord()
281 return StepsRecord.Builder(testMetadataBuilder.build(), startTime, endTime, stepCount) in stepsRecord()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/
DHealthConnectAccessLogsTest.java36 import android.health.connect.datatypes.StepsRecord;
82 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class).build()); in testAccessLogs_read_singleRecordType()
89 assertThat(accessLog.getRecordTypes()).contains(StepsRecord.class); in testAccessLogs_read_singleRecordType()
102 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class).build()); in testAccessLogs_read_multipleRecordTypes()
134 assertThat(accessLog.getRecordTypes()).contains(StepsRecord.class); in testAccessLogs_update_singleRecordType()
168 assertThat(accessLog.getRecordTypes()).contains(StepsRecord.class); in testAccessLogs_update_multipleRecordTypes()
189 assertThat(accessLog.getRecordTypes()).contains(StepsRecord.class); in testAccessLogs_insert_singleRecordType()
209 assertThat(accessLog.getRecordTypes()).contains(StepsRecord.class); in testAccessLogs_insert_multipleRecordTypes()
DGetActivityDatesTest.java30 import android.health.connect.datatypes.StepsRecord;
114 new StepsRecord.Builder( in testGetActivityDates_onUpdate()
165 .addRecordType(StepsRecord.class) in testGetActivityDates_onDelete()
195 new StepsRecord.Builder( in getTestRecords()
201 new StepsRecord.Builder( in getTestRecords()
DHealthConnectManagerTest.java33 import static android.health.connect.datatypes.StepsRecord.STEPS_COUNT_TOTAL;
90 import android.health.connect.datatypes.StepsRecord;
456 final List<StepsRecord> records = in testInsertRecords_intervalWithSameClientId_overwrites()
458 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testInsertRecords_intervalWithSameClientId_overwrites()
491 final List<StepsRecord> records = in testInsertRecords_intervalNoClientIdsAndSameTime_overwrites()
493 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testInsertRecords_intervalNoClientIdsAndSameTime_overwrites()
527 final List<StepsRecord> records = in testInsertRecords_intervalDifferentClientIdsAndSameTime_doesNotOverwrite()
529 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class) in testInsertRecords_intervalDifferentClientIdsAndSameTime_doesNotOverwrite()
678 StepsRecord stepsRecord = DataFactory.getStepsRecord(20, metadata); in testInsertRecords_metadataGiven_responseDoesNotMutateMetadataReference()
1583 StepsRecord testRecord = DataFactory.getStepsRecord(); in testDataApis_migrationInProgress_apisBlocked()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ratelimiter/
DRateLimiterTest.java19 import static android.health.connect.datatypes.StepsRecord.STEPS_COUNT_TOTAL;
42 import android.health.connect.datatypes.StepsRecord;
216 ReadRecordsRequestUsingFilters<StepsRecord> readRecordsRequestUsingFilters = in exceedReadQuota()
217 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in exceedReadQuota()
288 .addRecordType(StepsRecord.class) in getChangeLog()
329 .addRecordType(StepsRecord.class) in tryAcquireCallQuotaNTimesForWrite()
336 ReadRecordsRequestUsingIds.Builder<StepsRecord> request = in readStepsRecordUsingIds()
337 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class); in readStepsRecordUsingIds()
/packages/modules/HealthFitness/tests/integrationtests/TestApp/src/android/healthconnect/test/app/
DTestAppReceiver.java19 import static android.health.connect.datatypes.StepsRecord.STEPS_COUNT_TOTAL;
48 import android.health.connect.datatypes.StepsRecord;
175 DefaultOutcomeReceiver<ReadRecordsResponse<StepsRecord>> outcome = in readStepsRecordsUsingFilters()
177 ReadRecordsRequestUsingFilters.Builder<StepsRecord> requestBuilder = in readStepsRecordsUsingFilters()
178 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class); in readStepsRecordsUsingFilters()
189 DefaultOutcomeReceiver<ReadRecordsResponse<StepsRecord>> outcome = in readStepsRecordsUsingIds()
191 ReadRecordsRequestUsingIds.Builder<StepsRecord> requestBuilder = in readStepsRecordsUsingIds()
192 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class); in readStepsRecordsUsingIds()
362 private static StepsRecord createStepsRecord( in createStepsRecord()
366 return new StepsRecord.Builder(metadataBuilder.build(), startTime, endTime, steps).build(); in createStepsRecord()
/packages/modules/HealthFitness/testapps/toolbox/src/com/android/healthconnect/testapps/toolbox/ui/
DReadDataInBackgroundFragment.kt18 import android.health.connect.datatypes.StepsRecord
39 type = StepsRecord::class.java, in onViewCreated()
46 callToolbox2(ToolboxProxyPayload.ReadRecords(type = StepsRecord::class.java)) in onViewCreated()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/migration/
DDataMigrationTest.java67 import android.health.connect.datatypes.StepsRecord;
316 new StepsRecord.Builder(getMetadata(entityId), mStartTime, mEndTime, 10).build(), in migrateSteps_clientRecordId_stepsSaved()
320 final StepsRecord record = getRecord(StepsRecord.class, entityId); in migrateSteps_clientRecordId_stepsSaved()
337 new StepsRecord.Builder(getMetadata(uuid), mStartTime, mEndTime, 10).build(), in migrateSteps_uuid_stepsSaved()
341 final StepsRecord record = getRecord(StepsRecord.class, uuid); in migrateSteps_uuid_stepsSaved()
418 new StepsRecord.Builder(getMetadata(), mStartTime, mEndTime, steps1).build(), in migrateInstantRecord_noClientIdsAndSameTime_ignored()
424 new StepsRecord.Builder(getMetadata(), mStartTime, mEndTime, steps2).build(), in migrateInstantRecord_noClientIdsAndSameTime_ignored()
429 final List<StepsRecord> records = getRecords(StepsRecord.class); in migrateInstantRecord_noClientIdsAndSameTime_ignored()
430 mExpect.that(records.stream().map(StepsRecord::getCount).toList()).containsExactly(steps1); in migrateInstantRecord_noClientIdsAndSameTime_ignored()
445 new StepsRecord.Builder(getMetadata(entityId1), mStartTime, mEndTime, steps1) in migrateInstantRecord_differentClientIdsAndSameTime_notIgnored()
[all …]
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/selectabledeletion/api/
DDeleteEntriesUseCaseTest.kt20 import android.health.connect.datatypes.StepsRecord in <lambda>()
69 assertThat(listCaptor.value[0].recordType).isEqualTo(StepsRecord::class.java) in <lambda>()
71 assertThat(listCaptor.value[1].recordType).isEqualTo(StepsRecord::class.java) in <lambda>()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ui/
DPermissionTypesFragmentTest.kt21 import android.health.connect.datatypes.StepsRecord
59 StepsRecord.Builder(getEmptyMetadata(), now.minusSeconds(30), now, 43).build() in setup()
71 StepsRecord::class.java, in teardown()
DHomeFragmentTest.kt19 import android.health.connect.datatypes.StepsRecord
59 StepsRecord.Builder(getEmptyMetadata(), now.minusSeconds(30), now, 43).build()) in setup()
69 StepsRecord::class.java, in teardown()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/historicaccess/
DHistoricAccessLimitWithPermissionTest.java19 import static android.health.connect.datatypes.StepsRecord.STEPS_COUNT_TOTAL;
45 import android.health.connect.datatypes.StepsRecord;
102 new ReadRecordsRequestUsingFilters.Builder<>(StepsRecord.class) in testReadIntervalRecordsByFilters_expectCorrectResponse()
150 ReadRecordsRequestUsingIds.Builder<StepsRecord> readUsingIdsRequest = in testReadIntervalRecordsByIds_expectCorrectResponse()
151 new ReadRecordsRequestUsingIds.Builder<>(StepsRecord.class); in testReadIntervalRecordsByIds_expectCorrectResponse()

123