| /packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ |
| D | FetcherUtilTest.java | 45 import org.json.JSONArray; 230 JSONObject obj = new JSONObject().put(KEY, new JSONArray("[\"1\", \"2\"]")); in extractStringArray_stringArray_passes() 238 JSONObject obj = new JSONObject().put(KEY, new JSONArray("[\"1\", \"2\"]")); in extractStringArray_sizeTooBig_fails() 245 JSONObject obj = new JSONObject().put(KEY, new JSONArray("[\"1\", \"2345\"]")); in extractStringArray_stringTooLong_fails() 381 JSONArray filters = new JSONArray(json); in testAreValidAttributionFilters_filterSet_valid() 397 JSONArray filters = new JSONArray(json); in testAreValidAttributionFilters_removeSizeConstraints_valid() 430 JSONArray filters = new JSONArray(json); in areValidAttributionFilters_lookbackWindowAllowedAndValid_returnsTrue() 449 JSONArray filters = new JSONArray(json); in areValidAttributionFilters_validlLookbackWindowA_removeSizeConstrains_returnsTrue() 468 JSONArray filters = new JSONArray(json); in areValidAttributionFilters_lookbackWindowAllowedButInvalid_returnsFalse() 488 JSONArray filters = new JSONArray(json); in areValidAttributionFilters_invalidLookbackWindow_removeSizeConstraints_returnsFalse() [all …]
|
| /packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
| D | AfcServerResponseTest.java | 21 import org.json.JSONArray; 70 public JSONArray buildAvailableFrequencyInfoArray() { in buildAvailableFrequencyInfoArray() 72 JSONArray availableFrequencyInfo = new JSONArray(); in buildAvailableFrequencyInfoArray() 105 private JSONArray buildAvailableChannelInfoArray() { in buildAvailableChannelInfoArray() 114 JSONArray availableChannelInfo = new JSONArray(); in buildAvailableChannelInfoArray() 120 JSONArray channelCfisJSON1 = new JSONArray(); in buildAvailableChannelInfoArray() 121 JSONArray maxEirpsJSON1 = new JSONArray(); in buildAvailableChannelInfoArray() 122 JSONArray channelCfisJSON2 = new JSONArray(); in buildAvailableChannelInfoArray() 123 JSONArray maxEirpsJSON2 = new JSONArray(); in buildAvailableChannelInfoArray() 154 availableSpectrumInquiryResponse.put("availableFrequencyInfo", new JSONArray()); in buildSuccessfulSpectrumInquiryResponseWithEmptyFrequencyInfo() [all …]
|
| /packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/ |
| D | XnaSourceCreatorTest.java | 39 import org.json.JSONArray; 81 JSONArray filters = in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 82 new JSONArray( in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 106 new JSONArray( in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 131 new JSONArray( in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 157 new JSONArray(Arrays.asList("key2", "key3")).toString()) in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 181 new JSONArray(Arrays.asList("key2", "key3")).toString()) in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 198 new JSONArray(Collections.singletonList("key1")).toString()) in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 220 new JSONArray(Collections.singletonList("key1")).toString()) in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 318 JSONArray filters = in generateDerivedSources_sharedDebugKeyDisabled_doesntAddDebugKeyToDerivedSource() [all …]
|
| /packages/modules/Wifi/service/java/com/android/server/wifi/ |
| D | HalDeviceManagerUtil.java | 23 import org.json.JSONArray; 72 JSONArray availableModesJson = new JSONArray(); in staticChipInfoToJson() 84 JSONArray modesJson = jsonObject.getJSONArray(KEY_AVAILABLE_MODES); in jsonToStaticChipInfo() 98 JSONArray availableCombinationsJson = new JSONArray(); in chipModeToJson() 108 JSONArray availableCombinationsJson = in jsonToChipMode() 122 JSONArray limitsJson = new JSONArray(); in chipConcurrencyCombinationToJson() 133 JSONArray limitsJson = jsonObject.getJSONArray(KEY_CONCURRENCY_LIMITS); in jsonToChipConcurrencyCombination() 148 jsonObject.put(KEY_TYPES, new JSONArray(limit.types)); in chipConcurrencyCombinationLimitToJson() 155 JSONArray limitsJson = jsonObject.getJSONArray(KEY_TYPES); in jsonToChipConcurrencyCombinationLimit()
|
| /packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/ |
| D | TriggerTest.java | 37 import org.json.JSONArray; 99 JSONArray aggregateTriggerDatas = new JSONArray(); in testEqualsPass() 219 JSONArray aggregateTriggerDataList1 = new JSONArray(); in testEqualsFail() 224 JSONArray aggregateTriggerDataList2 = new JSONArray(); in testEqualsFail() 253 JSONArray attributionConfigList1 = new JSONArray(); in testEqualsFail() 271 JSONArray attributionConfigList2 = new JSONArray(); in testEqualsFail() 503 JSONArray triggerDatas = new JSONArray(); in testParseAggregateTrigger() 506 jsonObject1.put("source_keys", new JSONArray(Arrays.asList("campaignCounts"))); in testParseAggregateTrigger() 512 jsonObject2.put("source_keys", new JSONArray(Arrays.asList("geoValue", "noMatch"))); in testParseAggregateTrigger() 521 JSONArray aggregateDedupKeys = new JSONArray(); in testParseAggregateTrigger() [all …]
|
| D | AttributionConfigTest.java | 34 import org.json.JSONArray; 207 "source_type", new JSONArray(Collections.singletonList("navigation"))); in createExampleAttributionConfigJson() 208 JSONArray sourceFilterSet = new JSONArray(); in createExampleAttributionConfigJson() 213 "campaign_type", new JSONArray(Collections.singletonList("product"))); in createExampleAttributionConfigJson() 214 JSONArray sourceNotFilterSet = new JSONArray(); in createExampleAttributionConfigJson() 221 filterDataJson.put("campaign_type", new JSONArray(Collections.singletonList("install"))); in createExampleAttributionConfigJson() 230 sourceFiltersMap.put("source_type", new JSONArray(Collections.singletonList("navigation"))); in createExampleAttributionConfig() 235 "campaign_type", new JSONArray(Collections.singletonList("product"))); in createExampleAttributionConfig() 240 filterDataMap.put("campaign_type", new JSONArray(Collections.singletonList("install"))); in createExampleAttributionConfig()
|
| D | TriggerSpecTest.java | 25 import org.json.JSONArray; 46 json.put("trigger_data", new JSONArray(triggerData)); in getJson() 53 windows.put("end_times", new JSONArray(eventReportWindowsEnd)); in getJson() 60 json.put("summary_buckets", new JSONArray(summaryBucket)); in getJson() 90 .put("trigger_data", new JSONArray(new int[] {1, 2, 3, 4}))) in testEqualsFail() 94 .put("trigger_data", new JSONArray(new int[] {1, 2, 3}))) in testEqualsFail() 188 return new JSONArray(SourceFixture.getTriggerSpecCountEncodedJsonValidBaseline()) in getValidBaselineTestCase()
|
| /packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/entitlement/response/ |
| D | GetImsiPseudonymResponseTest.java | 32 import org.json.JSONArray; 62 JSONArray bodyArray = (new JSONArray()).put(body1).put(body2); in responseBodyCorrectWithRefreshInterval() 85 JSONArray bodyArray = (new JSONArray()).put(body1).put(body2); in responseBodyCorrectWithoutRefreshInterval() 117 JSONArray bodyArray = (new JSONArray()).put(body1).put(body2); in responseBodyInvalidRequest() 138 JSONArray bodyArray = (new JSONArray()).put(body1).put(body2); in responseBodyAuthFailed() 152 JSONArray bodyArray = (new JSONArray()).put(body2); in responseBodyWrongMessageId() 166 JSONArray bodyArray = (new JSONArray()).put(body2); in responseBodyServerError()
|
| D | ChallengeResponseTest.java | 26 import org.json.JSONArray; 45 JSONArray bodyArray = (new JSONArray()).put(body1); in responseBodyCorrect() 64 JSONArray bodyArray = (new JSONArray()).put(body1); in responseBodyInvalidRequest() 76 JSONArray bodyArray = (new JSONArray()).put(body1); in responseBodyWrongMessageId()
|
| /packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/updateprocessors/ |
| D | AppendTest.java | 45 import org.json.JSONArray; 82 JSONArray valuesJson = new JSONArray(); in testAppendSingle() 103 JSONArray valuesJson = new JSONArray(); in testAppendMultipleValues() 127 JSONArray valuesJson1 = new JSONArray(); in testAppendMultipleKeys() 131 JSONArray valuesJson2 = new JSONArray(); in testAppendMultipleKeys() 160 JSONArray valuesJson = new JSONArray(); in testOverwriteExisting() 187 JSONArray valuesJson = new JSONArray(); in testOverwriteMultipleExisting() 218 JSONArray valuesJson = new JSONArray(); in testAddToExisting() 245 JSONArray valuesJson = new JSONArray(); in testBadMaxValueThrowsException()
|
| D | RemoveTest.java | 33 import org.json.JSONArray; 65 JSONArray updatesJson = new JSONArray(); in testRemoveSingleNotPresent() 77 JSONArray updatesJson = new JSONArray(); in testRemoveSinglePresent() 93 JSONArray updatesJson = new JSONArray(); in testRemoveMultiplePresent()
|
| /packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/reporting/ |
| D | ReportUtil.java | 26 import org.json.JSONArray; 53 return new JSONArray( in serializeAttributionDestinations() 65 public static JSONArray serializeUnsignedLongs(@NonNull List<UnsignedLong> unsignedLongs) { in serializeUnsignedLongs() 66 return new JSONArray( in serializeUnsignedLongs() 77 public static JSONArray serializeSummaryBucket(@NonNull Pair<Long, Long> summaryBucket) { in serializeSummaryBucket() 78 JSONArray result = new JSONArray(); in serializeSummaryBucket()
|
| /packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/common/ |
| D | FledgeRoomConverters.java | 28 import org.json.JSONArray; 109 JSONArray jsonSet = new JSONArray(stringSet); in serializeStringSet() 122 JSONArray jsonSet; in deserializeStringSet() 124 jsonSet = new JSONArray(serializedSet); in deserializeStringSet() 157 JSONArray jsonSet = new JSONArray(integerSet); in serializeIntegerSet() 170 JSONArray jsonSet; in deserializeIntegerSet() 172 jsonSet = new JSONArray(serializedSet); in deserializeIntegerSet()
|
| /packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/util/ |
| D | Filter.java | 25 import org.json.JSONArray; 149 public List<FilterMap> deserializeFilterSet(@NonNull JSONArray filters) throws JSONException { in deserializeFilterSet() 169 public JSONArray serializeFilterSet(@NonNull List<FilterMap> filterMaps) { in serializeFilterSet() 170 JSONArray serializedFilterMaps = new JSONArray(); in serializeFilterSet() 188 public static JSONArray maybeWrapFilters(@NonNull JSONObject json, @NonNull String key) in maybeWrapFilters() 192 JSONArray filterSet = new JSONArray(); in maybeWrapFilters()
|
| /packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/entitlement/ |
| D | CarrierSpecificServiceEntitlementTest.java | 45 import org.json.JSONArray; 115 when(mRequestFactory.createAuthRequest()).thenReturn(new JSONArray()); in getImsiPseudonymSuccess() 117 .thenReturn(new JSONArray()); in getImsiPseudonymSuccess() 140 when(mRequestFactory.createAuthRequest()).thenReturn(new JSONArray()); in getImsiPseudonymFail() 156 JSONArray bodyArray = (new JSONArray()).put(body); in getAuthHttpResponse() 164 JSONArray bodyArray = (new JSONArray()).put(body); in getAuthFailedHttpResponse() 174 JSONArray bodyArray = (new JSONArray()).put(body); in getGetImsiPseudonymHttpResponse()
|
| /packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/shell/customaudience/ |
| D | CustomAudienceHelper.java | 38 import org.json.JSONArray; 127 JSONArray keys = new JSONArray(); in getJsonFromTrustedBiddingData() 132 private static JSONArray getJsonArrayFromAdsList(@Nullable List<DBAdData> ads) in getJsonArrayFromAdsList() 134 JSONArray array = new JSONArray(); in getJsonArrayFromAdsList() 209 private static ImmutableList<DBAdData> getAdsFromJsonArray(JSONArray jsonArray) in getAdsFromJsonArray() 237 private static ImmutableList<String> getStringsFromJsonArray(JSONArray jsonArray) in getStringsFromJsonArray() 246 private static JSONArray getJsonArrayFromIntegerSet(Set<Integer> integerSet) { in getJsonArrayFromIntegerSet() 247 JSONArray jsonArray = new JSONArray(); in getJsonArrayFromIntegerSet() 254 private static ImmutableSet<Integer> getIntegersFromJsonArray(@NonNull JSONArray jsonArray) in getIntegersFromJsonArray()
|
| /packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/ |
| D | DebugReportingJobHandlerTest.java | 54 import org.json.JSONArray; 137 JSONArray debugReportPayload = new JSONArray(); in testSendDebugReportForSuccess() 164 JSONArray debugReportPayload = new JSONArray(); in testSendDebugReportForFailure() 188 JSONArray debugReportPayload1 = new JSONArray(); in testPerformScheduledReportsForMultipleReports() 191 JSONArray debugReportPayload2 = new JSONArray(); in testPerformScheduledReportsForMultipleReports() 219 JSONArray debugReportPayload1 = new JSONArray(); in testPerformScheduledReports_ThreadInterrupted() 222 JSONArray debugReportPayload2 = new JSONArray(); in testPerformScheduledReports_ThreadInterrupted() 254 JSONArray debugReportPayload1 = new JSONArray(); in testPerformScheduledReports_LogZeroRetryCount() 293 JSONArray debugReportPayload1 = new JSONArray(); in testPerformScheduledReports_LogReportNotFound() 329 doReturn(new JSONArray(Collections.singletonList(debugReport.toPayloadJson()))) in performReport_throwsIOException_logsReportingStatus() [all …]
|
| D | EventReportPayloadTest.java | 28 import org.json.JSONArray; 151 assertTrue(triggerDebugKeysObj instanceof JSONArray); in toJson_success() 153 ((JSONArray) triggerDebugKeysObj).getString(0)); in toJson_success() 155 ((JSONArray) triggerDebugKeysObj).getString(1)); in toJson_success() 157 assertTrue(eventPayloadReportJson.get("trigger_summary_bucket") instanceof JSONArray); in toJson_success() local 158 JSONArray triggerSummaryBucket = in toJson_success() 176 assertTrue(obj instanceof JSONArray); in toJson_multipleAttributionDestinations_setsDestinationsAsOrderedJSONArray() 177 assertEquals(DESTINATION_1.toString(), ((JSONArray) obj).getString(0)); in toJson_multipleAttributionDestinations_setsDestinationsAsOrderedJSONArray() 178 assertEquals(DESTINATION_2.toString(), ((JSONArray) obj).getString(1)); in toJson_multipleAttributionDestinations_setsDestinationsAsOrderedJSONArray() 263 assertTrue(triggerDebugKeysObj instanceof JSONArray); in testEventPayloadJsonSerializationWithMultipleTriggerDebugKeys() [all …]
|
| D | ReportUtilTest.java | 28 import org.json.JSONArray; 61 JSONArray expected = new JSONArray(List.of(DESTINATION_1, DESTINATION_2, DESTINATION_3)); in serializeAttributionDestinations_multipleDestinations_returnsOrderedJSONArray() 67 JSONArray serialized = ReportUtil.serializeUnsignedLongs(UNSIGNED_LONGS); in serializeUnsignedLongs_returnsJSONArray() 75 JSONArray result = ReportUtil.serializeSummaryBucket(summaryBucket); in serializeSummaryBucket_baseCase_returnsExpectedFormat() 87 JSONArray result = ReportUtil.serializeSummaryBucket(summaryBucket); in serializeSummaryBucket_largestBucket_returnsExpectedFormat()
|
| /packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/ |
| D | GoogleSuggestClient.kt | 42 import org.json.JSONArray 113 val results = JSONArray(sb.toString()) in query() 114 val suggestions: JSONArray = results.getJSONArray(1) in query() 115 val popularity: JSONArray = results.getJSONArray(2) in query() 154 suggestions: JSONArray, 155 popularity: JSONArray 158 private val mSuggestions: JSONArray 163 private val mPopularity: JSONArray
|
| /packages/modules/Wifi/service/java/com/android/server/wifi/entitlement/ |
| D | RequestFactory.java | 29 import org.json.JSONArray; 78 public JSONArray createAuthRequest() throws TransientException { in createAuthRequest() 79 JSONArray requests = new JSONArray(); in createAuthRequest() 92 public JSONArray createGetImsiPseudonymRequest(String akaToken, String challengeResponse) in createGetImsiPseudonymRequest() 94 JSONArray requests = new JSONArray(); in createGetImsiPseudonymRequest()
|
| /packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/registration/ |
| D | AsyncTriggerFetcher.java | 53 import org.json.JSONArray; 169 String eventTriggerData = new JSONArray().toString(); in parseTrigger() 220 JSONArray filters = Filter.maybeWrapFilters(json, TriggerHeaderContract.FILTERS); in parseTrigger() 231 JSONArray notFilters = in parseTrigger() 579 private Optional<String> getValidEventTriggerData(JSONArray eventTriggerDataArr) { in getValidEventTriggerData() 580 JSONArray validEventTriggerData = new JSONArray(); in getValidEventTriggerData() 626 JSONArray filters = Filter.maybeWrapFilters(eventTriggerDatum, "filters"); in getValidEventTriggerData() 639 JSONArray notFilters = in getValidEventTriggerData() 669 private Optional<String> getValidAggregateTriggerData(JSONArray aggregateTriggerDataArr) in getValidAggregateTriggerData() 671 JSONArray validAggregateTriggerData = new JSONArray(); in getValidAggregateTriggerData() [all …]
|
| /packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/measurement/migration/ |
| D | MeasurementDbMigratorV3.java | 30 import org.json.JSONArray; 382 .map(JSONArray::toString).orElse(null); in updateTrigger() 419 JSONArray jsonArray = new JSONArray(aggregateSourceStringV2); in convertAggregateSource() 437 return new JSONArray().toString(); in updateEventTriggers() 441 return updateEventTriggers(new JSONArray(eventTriggers)); in updateEventTriggers() 445 return new JSONArray().toString(); in updateEventTriggers() 449 private static String updateEventTriggers(JSONArray eventTriggers) throws JSONException { in updateEventTriggers() 465 return convertFiltersInObjectArray(new JSONArray(aggregateTriggerData)); in convertAggregateTriggerData() 473 private static String convertFiltersInObjectArray(JSONArray objectArray) throws JSONException { in convertFiltersInObjectArray() 477 JSONArray convertedFilters = convertFilters( in convertFiltersInObjectArray() [all …]
|
| /packages/modules/AdServices/adservices/tests/unittest/fixtures/java/com/android/adservices/service/customaudience/ |
| D | CustomAudienceUpdatableDataFixture.java | 42 import org.json.JSONArray; 111 JSONArray adsArray = new JSONArray(); in getDeeperMalformedJsonObject() 256 JSONArray trustedBiddingKeysJson = new JSONArray(trustedBiddingData.getKeys()); in addToJsonObject() 281 JSONArray adsJson = new JSONArray(); in addToJsonObject() 303 adJson.put(AD_COUNTERS_KEY, new JSONArray(ad.getAdCounterKeys())); in addToJsonObject() 334 JSONArray array = new JSONArray(auctionServerRequestFlags); in addAuctionServerRequestFlagsToJsonObject()
|
| /packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/ |
| D | ScheduleCustomAudienceUpdateTestUtils.java | 38 import org.json.JSONArray; 90 JSONArray joinCustomAudienceArray = new JSONArray(); in createJsonResponsePayload() 105 JSONArray leaveCustomAudienceArray = new JSONArray(); in createJsonResponsePayload() 144 JSONArray jsonArray = new JSONArray(requestBodyString); in extractPartialCustomAudiencesFromRequest()
|