Home
last modified time | relevance | path

Searched refs:records (Results 1 – 25 of 134) sorted by relevance

123456

/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/device/src/android/healthconnect/cts/device/
DExerciseRouteAccessTest.java77 List<ExerciseSessionRecord> records = in testRouteRead_cannotAccessOtherAppRoute() local
82 assertThat(records).isNotNull(); in testRouteRead_cannotAccessOtherAppRoute()
83 assertThat(records).hasSize(1); in testRouteRead_cannotAccessOtherAppRoute()
84 assertThat(records.get(0).hasRoute()).isTrue(); in testRouteRead_cannotAccessOtherAppRoute()
85 assertThat(records.get(0).getRoute()).isNull(); in testRouteRead_cannotAccessOtherAppRoute()
107 List<ExerciseSessionRecord> records = in testRouteUpdate_updateRouteWithPerm_noRouteAfterUpdate() local
111 assertThat(records).isNotNull(); in testRouteUpdate_updateRouteWithPerm_noRouteAfterUpdate()
112 assertThat(records).hasSize(1); in testRouteUpdate_updateRouteWithPerm_noRouteAfterUpdate()
113 assertThat(records.get(0).hasRoute()).isTrue(); in testRouteUpdate_updateRouteWithPerm_noRouteAfterUpdate()
117 records = in testRouteUpdate_updateRouteWithPerm_noRouteAfterUpdate()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/
DGetActivityDatesTest.java58 List<Record> records = getTestRecords(); in testEmptyActivityDates() local
62 records.stream().map(Record::getClass).collect(Collectors.toList())); in testEmptyActivityDates()
69 List<Record> records = getTestRecords(); in testActivityDates() local
70 TestUtils.insertRecords(records); in testActivityDates()
76 records.stream().map(Record::getClass).collect(Collectors.toList())); in testActivityDates()
80 records.stream().map(this::getRecordDate).collect(Collectors.toSet())); in testActivityDates()
85 List<Record> records = getTestRecords(); in testGetActivityDates_onUpdate() local
86 TestUtils.insertRecords(records); in testGetActivityDates_onUpdate()
92 records.stream().map(Record::getClass).collect(Collectors.toList())); in testGetActivityDates_onUpdate()
96 records.stream().map(this::getRecordDate).collect(Collectors.toSet())); in testGetActivityDates_onUpdate()
[all …]
DSleepSessionRecordTest.java226 List<Record> records = List.of(TestUtils.buildSleepSession()); in testReadById_insertAndReadByIdOne_recordsAreEqual() local
227 TestUtils.insertRecords(records); in testReadById_insertAndReadByIdOne_recordsAreEqual()
231 request.addId(records.get(0).getMetadata().getId()); in testReadById_insertAndReadByIdOne_recordsAreEqual()
234 SleepSessionRecord insertedRecord = (SleepSessionRecord) records.get(0); in testReadById_insertAndReadByIdOne_recordsAreEqual()
246 List<Record> records = List.of(TestUtils.buildSleepSession(), buildSleepSessionMinimal()); in testReadById_insertAndReadById_recordsAreEqual() local
247 TestUtils.insertRecords(records); in testReadById_insertAndReadById_recordsAreEqual()
251 request.addId(records.get(0).getMetadata().getId()); in testReadById_insertAndReadById_recordsAreEqual()
252 request.addId(records.get(1).getMetadata().getId()); in testReadById_insertAndReadById_recordsAreEqual()
254 assertRecordsAreEqual(records, TestUtils.readRecords(request.build())); in testReadById_insertAndReadById_recordsAreEqual()
260 List<Record> records = List.of(TestUtils.buildSleepSession(), buildSleepSessionMinimal()); in testReadByClientId_insertAndReadByClientId_recordsAreEqual() local
[all …]
DExerciseSessionRecordTest.java331 List<Record> records = in testInsertRecord_apiReturnsRequestedRecords() local
333 List<Record> insertedRecords = TestUtils.insertRecords(records); in testInsertRecord_apiReturnsRequestedRecords()
334 assertThat(records.size()).isEqualTo(insertedRecords.size()); in testInsertRecord_apiReturnsRequestedRecords()
335 assertThat(records).containsExactlyElementsIn(insertedRecords); in testInsertRecord_apiReturnsRequestedRecords()
340 List<Record> records = List.of(TestUtils.buildExerciseSession(), buildSessionMinimal()); in testReadById_insertAndReadById_recordsAreEqual() local
341 TestUtils.insertRecords(records); in testReadById_insertAndReadById_recordsAreEqual()
345 request.addId(records.get(0).getMetadata().getId()); in testReadById_insertAndReadById_recordsAreEqual()
346 request.addId(records.get(1).getMetadata().getId()); in testReadById_insertAndReadById_recordsAreEqual()
348 assertRecordsAreEqual(records, TestUtils.readRecords(request.build())); in testReadById_insertAndReadById_recordsAreEqual()
353 List<Record> records = List.of(TestUtils.buildExerciseSession()); in testReadById_insertAndReadByIdOne_recordsAreEqual() local
[all …]
DSessionDatatypeDisabledFeatureTest.java70 List<Record> records = List.of(TestUtils.buildExerciseSession()); in testWriteExerciseSession_insertWithDisableFeature_throwsException() local
72 TestUtils.insertRecords(records); in testWriteExerciseSession_insertWithDisableFeature_throwsException()
83 List<Record> records = List.of(TestUtils.buildExerciseSession()); in testReadExerciseSession_insertAndRead_sessionIsNotAvailable() local
84 TestUtils.insertRecords(records); in testReadExerciseSession_insertAndRead_sessionIsNotAvailable()
88 request.addId(records.get(0).getMetadata().getId()); in testReadExerciseSession_insertAndRead_sessionIsNotAvailable()
97 List<Record> records = List.of(TestUtils.buildSleepSession()); in testWriteSleepSession_insertWithDisableFeature_throwsException() local
99 TestUtils.insertRecords(records); in testWriteSleepSession_insertWithDisableFeature_throwsException()
110 List<Record> records = List.of(TestUtils.buildSleepSession()); in testReadSleepSession_insertAndRead_sessionIsNotAvailable() local
111 TestUtils.insertRecords(records); in testReadSleepSession_insertAndRead_sessionIsNotAvailable()
116 request.addId(records.get(0).getMetadata().getId()); in testReadSleepSession_insertAndRead_sessionIsNotAvailable()
DBasalMetabolicRateRecordTest.java93 List<Record> records = in testInsertBasalMetabolicRateRecord() local
95 TestUtils.insertRecords(records); in testInsertBasalMetabolicRateRecord()
253 List<Record> records = in testDeleteBasalMetabolicRateRecord_recordId_filters() local
255 TestUtils.insertRecords(records); in testDeleteBasalMetabolicRateRecord_recordId_filters()
257 for (Record record : records) { in testDeleteBasalMetabolicRateRecord_recordId_filters()
294 List<Record> records = in testDeleteBasalMetabolicRateRecord_usingIds() local
296 List<Record> insertedRecord = TestUtils.insertRecords(records); in testDeleteBasalMetabolicRateRecord_usingIds()
297 List<RecordIdFilter> recordIds = new ArrayList<>(records.size()); in testDeleteBasalMetabolicRateRecord_usingIds()
303 for (Record record : records) { in testDeleteBasalMetabolicRateRecord_usingIds()
355 List<Record> records = in testAggregation_BasalCaloriesBurntTotal_lbm() local
[all …]
DExerciseRouteDisabledFeatureTest.java59 List<Record> records = List.of(TestUtils.buildExerciseSession()); in testWriteRoute_insertWithDisableFeature_throwsException() local
61 TestUtils.insertRecords(records); in testWriteRoute_insertWithDisableFeature_throwsException()
71 List<Record> records = List.of(TestUtils.buildExerciseSession()); in testReadRoute_insertAndRead_routeIsNotAvailable() local
72 TestUtils.insertRecords(records); in testReadRoute_insertAndRead_routeIsNotAvailable()
74 ExerciseSessionRecord insertedRecord = (ExerciseSessionRecord) records.get(0); in testReadRoute_insertAndRead_routeIsNotAvailable()
80 request.addId(records.get(0).getMetadata().getId()); in testReadRoute_insertAndRead_routeIsNotAvailable()
DStepsRecordTest.java98 List<Record> records = List.of(getBaseStepsRecord(), getCompleteStepsRecord()); in testInsertStepsRecord() local
99 TestUtils.insertRecords(records); in testInsertStepsRecord()
104 List<Record> records = List.of(getBaseStepsRecord(), getStepsRecord_minusDays(1)); in testUpdateStepsRecordToDuplicate() local
105 records = TestUtils.insertRecords(records); in testUpdateStepsRecordToDuplicate()
111 (StepsRecord) records.get(1), (StepsRecord) records.get(0)))); in testUpdateStepsRecordToDuplicate()
116 .contains(records.get(0).getMetadata().getId()); in testUpdateStepsRecordToDuplicate()
118 .contains(records.get(1).getMetadata().getId()); in testUpdateStepsRecordToDuplicate()
564 List<Record> records = List.of(getBaseStepsRecord(), getCompleteStepsRecord()); in testDeleteStepsRecord_recordId_filters() local
565 TestUtils.insertRecords(records); in testDeleteStepsRecord_recordId_filters()
567 for (Record record : records) { in testDeleteStepsRecord_recordId_filters()
[all …]
/packages/services/Car/cpp/evs/manager/aidl/stats/src/
DStatsCollector.cpp154 if (info->records[id].history.size() > info->maxCacheSize) { in collectLocked()
155 info->records[id].history.pop_front(); in collectLocked()
159 auto delta = snapshot - info->records[id].latest; in collectLocked()
160 info->records[id].history.push_back(delta); in collectLocked()
161 info->records[id].latest = snapshot; in collectLocked()
279 if (mCustomCollectionInfo.records.size() > 0) { in startCustomCollection()
290 .records = {}, in startCustomCollection()
326 for (auto& [id, records] : mCustomCollectionInfo.records) { in stopCustomCollection()
331 id.data(), kSingleIndent, records.history.size(), kSingleIndent, in stopCustomCollection()
333 auto it = records.history.rbegin(); in stopCustomCollection()
[all …]
/packages/services/Car/cpp/evs/manager/1.1/stats/
DStatsCollector.cpp155 if (info->records[id].history.size() > info->maxCacheSize) { in collectLocked()
156 info->records[id].history.pop_front(); in collectLocked()
160 auto delta = snapshot - info->records[id].latest; in collectLocked()
161 info->records[id].history.emplace_back(delta); in collectLocked()
162 info->records[id].latest = snapshot; in collectLocked()
276 if (mCustomCollectionInfo.records.size() > 0) { in startCustomCollection()
287 .records = {}, in startCustomCollection()
320 for (auto& [id, records] : mCustomCollectionInfo.records) { in stopCustomCollection()
325 id.c_str(), kSingleIndent, records.history.size(), kSingleIndent, in stopCustomCollection()
327 auto it = records.history.rbegin(); in stopCustomCollection()
[all …]
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsResponse.java36 private final List<MdnsRecord> records; field in MdnsResponse
51 records = new LinkedList<>(); in MdnsResponse()
61 records = new ArrayList<>(base.records); in MdnsResponse()
91 records.remove(existedRecord); in addOrReplaceRecord()
94 records.add(record); in addOrReplaceRecord()
102 final int existing = records.indexOf(record); in hasIdenticalRecord()
103 return existing >= 0 && recordsAreSame(record, records.get(existing)); in hasIdenticalRecord()
175 records.remove(this.serviceRecord); in setServiceRecord()
179 records.add(this.serviceRecord); in setServiceRecord()
197 records.remove(this.textRecord); in setTextRecord()
[all …]
DMdnsProber.java86 private static MdnsPacket makePacket(@NonNull List<MdnsRecord> records) { in makePacket() argument
87 final ArrayList<MdnsRecord> questions = new ArrayList<>(records.size()); in makePacket()
88 for (final MdnsRecord record : records) { in makePacket()
107 records /* authorityRecords */, in makePacket()
114 private static boolean containsName(@NonNull List<MdnsRecord> records, in containsName() argument
116 return CollectionUtils.any(records, r -> Arrays.equals(name, r.getName())); in containsName()
/packages/services/Mtp/tests/src/com/android/mtp/
DMtpManagerTest.java84 final MtpDeviceRecord[] records = mManager.getDevices(); in testOperationsSupported() local
85 assertEquals(1, records.length); in testOperationsSupported()
86 assertNotNull(records[0].operationsSupported); in testOperationsSupported()
87 getInstrumentation().show(Arrays.toString(records[0].operationsSupported)); in testOperationsSupported()
91 final MtpDeviceRecord[] records = mManager.getDevices(); in testEventsSupported() local
92 assertEquals(1, records.length); in testEventsSupported()
93 assertNotNull(records[0].eventsSupported); in testEventsSupported()
94 getInstrumentation().show(Arrays.toString(records[0].eventsSupported)); in testEventsSupported()
98 final MtpDeviceRecord[] records = mManager.getDevices(); in testDeviceKey() local
99 assertEquals(1, records.length); in testDeviceKey()
[all …]
/packages/services/Mtp/src/com/android/mtp/
DServiceIntentSender.java59 void sendUpdateNotificationIntent(@NonNull MtpDeviceRecord[] records) { in sendUpdateNotificationIntent() argument
60 Preconditions.checkNotNull(records); in sendUpdateNotificationIntent()
63 if (records.length != 0) { in sendUpdateNotificationIntent()
64 final int[] ids = new int[records.length]; in sendUpdateNotificationIntent()
65 final Notification[] notifications = new Notification[records.length]; in sendUpdateNotificationIntent()
66 for (int i = 0; i < records.length; i++) { in sendUpdateNotificationIntent()
67 ids[i] = records[i].deviceId; in sendUpdateNotificationIntent()
68 notifications[i] = createNotification(mContext, records[i]); in sendUpdateNotificationIntent()
/packages/services/Iwlan/test/com/google/android/iwlan/epdg/
DSrvDnsResolverTest.java171 final List<SrvRecordInetAddress> records = mSrvDnsResult.join(); in testQueryGivesSrvAndIpAddressResponse() local
173 assertEquals(records.size(), 4); in testQueryGivesSrvAndIpAddressResponse()
175 SrvRecordInetAddress record = records.get(0); in testQueryGivesSrvAndIpAddressResponse()
179 record = records.get(1); in testQueryGivesSrvAndIpAddressResponse()
183 record = records.get(2); in testQueryGivesSrvAndIpAddressResponse()
187 record = records.get(3); in testQueryGivesSrvAndIpAddressResponse()
234 List<SrvRecordInetAddress> records = mSrvDnsResult.join(); in testQueryGivesSrvResponseFollowUpQueriesGiveIpAddress() local
235 assertEquals(records.size(), 4); in testQueryGivesSrvResponseFollowUpQueriesGiveIpAddress()
237 SrvRecordInetAddress record = records.get(0); in testQueryGivesSrvResponseFollowUpQueriesGiveIpAddress()
241 record = records.get(1); in testQueryGivesSrvResponseFollowUpQueriesGiveIpAddress()
[all …]
/packages/modules/IntentResolver/java/src/com/android/intentresolver/contentpreview/
DPreviewDataProvider.kt83 private val records = targetIntent.contentUris.map { UriRecord(it) } in <lambda>() constant in com.android.intentresolver.contentpreview.PreviewDataProvider
89 MutableSharedFlow<FileInfo>(replay = records.size).apply { in <lambda>()
92 for (record in records) { in <lambda>()
103 get() = records.size in <lambda>()
111 get() = fileInfoSharedFlow.take(records.size) in <lambda>()
125 if (!targetIntent.isSend || records.isEmpty()) { in <lambda>()
151 records.firstOrNull()?.let { record -> in <lambda>()
189 if (records.isEmpty()) { in <lambda>()
200 if (records.isEmpty()) throw IndexOutOfBoundsException("There are no shared URIs") in <lambda>()
202 val record = records[0] in <lambda>()
[all …]
/packages/apps/Tag/src/com/android/apps/tag/record/
DSmartPoster.java137 Iterable<ParsedNdefRecord> records = NdefMessageParser.getRecords(recordsRaw); in parse() local
138 UriRecord uri = Iterables.getOnlyElement(Iterables.filter(records, UriRecord.class)); in parse()
139 TextRecord title = getFirstIfExists(records, TextRecord.class); in parse()
140 ImageRecord image = getFirstIfExists(records, ImageRecord.class); in parse()
224 private static NdefRecord getByType(byte[] type, NdefRecord[] records) { in getByType() argument
225 for (NdefRecord record : records) { in getByType()
235 private static RecommendedAction parseRecommendedAction(NdefRecord[] records) { in parseRecommendedAction() argument
236 NdefRecord record = getByType(ACTION_RECORD_TYPE, records); in parseRecommendedAction()
249 private static String parseType(NdefRecord[] records) { in parseType() argument
250 NdefRecord type = getByType(TYPE_TYPE, records); in parseType()
/packages/modules/HealthFitness/testapps/toolbox/src/com/android/healthconnect/testapps/toolbox/utils/
DGeneralUtils.kt59 records: List<T>, in <lambda>()
67 records, Runnable::run, continuation.asOutcomeReceiver()) in <lambda>()
69 .records in <lambda>()
77 records: List<T>, in <lambda>()
82 manager.updateRecords(records, Runnable::run, continuation.asOutcomeReceiver()) in <lambda>()
115 val records = in <lambda>() constant
119 .records in <lambda>()
121 return records in <lambda>()
/packages/services/Car/cpp/watchdog/server/src/
DPerformanceProfiler.cpp367 if (records.empty()) { in toString()
371 double duration = difftime(records.back().time, records.front().time); in toString()
372 StringAppendF(&buffer, kCollectionTitle, duration, records.size()); in toString()
373 for (size_t i = 0; i < records.size(); ++i) { in toString()
374 const auto& record = records[i]; in toString()
401 .records = {}, in init()
405 .records = {}, in init()
409 .records = {}, in init()
413 .records = {}, in init()
423 mBoottimeCollection.records.clear(); in terminate()
[all …]
/packages/services/Car/cpp/watchdog/server/tests/
DPerformanceProfilerTest.cpp254 const std::vector<PerfStatsRecord>& records) { in constructPerfStatsRecordMatchers() argument
256 for (const auto& record : records) { in constructPerfStatsRecordMatchers()
265 Field("records", &CollectionInfo::records,
267 expected.records)))),
277 Field("records", &UserSwitchCollectionInfo::records,
279 expected.records)))),
641 .records = {{ in TEST_F()
670 .records = {{ in TEST_F()
701 EXPECT_THAT(actualBoottimeCollection.records.size(), 1) in TEST_F()
703 EXPECT_THAT(actualWakeUpCollection.records.size(), 1) << "Wake-up collection records is empty."; in TEST_F()
[all …]
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/route/
DLoadExerciseRouteUseCase.kt45 val records: List<ExerciseSessionRecord> = in <lambda>() constant
51 .records in <lambda>()
52 if (records.isEmpty() || !records[0].hasRoute()) { in <lambda>()
55 return records[0] in <lambda>()
/packages/modules/DnsResolver/tests/fuzzer/
Dresolv_fuzzer_utils.cpp31 void StartDns(test::DNSResponder& dns, const std::vector<DnsRecord>& records) { in StartDns() argument
32 for (const auto& r : records) { in StartDns()
56 StartDns(dns, records); in InitServers()
58 StartDns(doh_backend, records); in InitServers()
60 StartDns(dot_backend, records); in InitServers()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/
DLoadMenstruationDataUseCase.kt84 val records = in <lambda>() constant
90 .records in <lambda>()
97 return records.map { record -> menstruationPeriodFormatter.format(startDate, record) } in <lambda>()
114 val records = in <lambda>() constant
120 .records in <lambda>()
122 return records.mapNotNull { record -> getFormatterRecord(record) } in <lambda>()
/packages/modules/Bluetooth/system/btif/src/
Dbtif_sdp.cc51 bt_status_t create_sdp_record(bluetooth_sdp_record* records,
76 evt_data->records); in btif_sdp_search_comp_evt()
90 copy_sdp_records(p_src_data->records, p_dest_data->records, in sdp_search_comp_copy_cb()
99 size += get_sdp_records_size(p_data->sdp_search_comp.records, in sdp_dm_cback()
/packages/apps/TV/src/com/android/tv/recommendation/
DRecommender.java121 List<Pair<Channel, Double>> records = new ArrayList<>(); in recommendChannels() local
132 records.add(Pair.create(cr.getChannel(), maxScore)); in recommendChannels()
135 if (size > records.size()) { in recommendChannels()
136 size = records.size(); in recommendChannels()
138 Collections.sort(records, mChannelScoreComparator); in recommendChannels()
146 mChannelSortKey.put(records.get(i).first.getId(), String.format(sortKeyFormat, i)); in recommendChannels()
147 results.add(records.get(i).first); in recommendChannels()

123456