/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/com/android/adservices/service/customaudience/ |
D | CustomAudienceUpdatableDataFixture.java | 44 import org.json.JSONObject; 85 public static JSONObject getMalformedJsonObject() throws JSONException { in getMalformedJsonObject() 86 JSONObject jsonResponse = new JSONObject(); in getMalformedJsonObject() 101 public static JSONObject getDeeperMalformedJsonObject() throws JSONException { in getDeeperMalformedJsonObject() 102 JSONObject jsonResponse = new JSONObject(); in getDeeperMalformedJsonObject() 106 JSONObject trustedBiddingDataObject = new JSONObject(); in getDeeperMalformedJsonObject() 112 JSONObject adObject0 = new JSONObject(); in getDeeperMalformedJsonObject() 116 JSONObject adObject1 = new JSONObject(); in getDeeperMalformedJsonObject() 129 public static JSONObject getMalformedNullJsonObject() throws JSONException { in getMalformedNullJsonObject() 130 JSONObject jsonResponse = new JSONObject(); in getMalformedNullJsonObject() [all …]
|
D | CustomAudienceBlobFixture.java | 48 import org.json.JSONObject; 89 public static JSONObject asJSONObject( in asJSONObject() 102 JSONObject json = new JSONObject(); in asJSONObject() 124 public static JSONObject addOwner(JSONObject json, String owner, boolean shouldAddHarmlessJunk) in addOwner() 138 public static JSONObject addBuyer( in addBuyer() 139 JSONObject json, AdTechIdentifier adTechIdentifier, boolean shouldAddHarmlessJunk) in addBuyer() 154 public static JSONObject addName(JSONObject json, String name, boolean shouldAddHarmlessJunk) in addName() 168 public static JSONObject addActivationTime( in addActivationTime() 169 JSONObject json, Instant activationTime, boolean shouldAddHarmlessJunk) in addActivationTime() 187 public static JSONObject addExpirationTime( in addExpirationTime() [all …]
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | AfcServerResponseTest.java | 23 import org.json.JSONObject; 46 private JSONObject buildSuccessfulSpectrumInquiryResponse() { in buildSuccessfulSpectrumInquiryResponse() 47 JSONObject availableSpectrumInquiryResponse = new JSONObject(); in buildSuccessfulSpectrumInquiryResponse() 55 availableSpectrumInquiryResponse.put("response", new JSONObject()); in buildSuccessfulSpectrumInquiryResponse() 73 JSONObject frequencyJSON1 = new JSONObject(); in buildAvailableFrequencyInfoArray() 74 JSONObject frequencyJSON2 = new JSONObject(); in buildAvailableFrequencyInfoArray() 75 JSONObject frequencyJSON3 = new JSONObject(); in buildAvailableFrequencyInfoArray() 76 JSONObject frequencyRangeJSON1 = new JSONObject(); in buildAvailableFrequencyInfoArray() 77 JSONObject frequencyRangeJSON2 = new JSONObject(); in buildAvailableFrequencyInfoArray() 78 JSONObject frequencyRangeJSON3 = new JSONObject(); in buildAvailableFrequencyInfoArray() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/ |
D | TriggerTest.java | 39 import org.json.JSONObject; 100 JSONObject aggregateTriggerData1 = new JSONObject(); in testEqualsPass() 103 JSONObject aggregateTriggerData2 = new JSONObject(); in testEqualsPass() 108 JSONObject values = new JSONObject(); in testEqualsPass() 111 JSONObject adtechBitMapping = new JSONObject(); in testEqualsPass() 220 JSONObject aggregateTriggerData1 = new JSONObject(); in testEqualsFail() 225 JSONObject aggregateTriggerData2 = new JSONObject(); in testEqualsFail() 234 JSONObject values1 = new JSONObject(); in testEqualsFail() 236 JSONObject values2 = new JSONObject(); in testEqualsFail() 254 JSONObject attributionConfig1 = new JSONObject(); in testEqualsFail() [all …]
|
D | E2ETest.java | 63 import org.json.JSONObject; 240 public ParamsProvider(JSONObject json) throws JSONException { in ParamsProvider() 296 public static String getFirstUrl(JSONObject registrationObj) in getFirstUrl() 304 public static boolean hasArDebugPermission(JSONObject obj) throws JSONException { in hasArDebugPermission() 305 JSONObject urlToResponse = in hasArDebugPermission() 311 public static boolean hasAdIdPermission(JSONObject obj) throws JSONException { in hasAdIdPermission() 312 JSONObject urlToResponse = in hasAdIdPermission() 318 public static boolean hasSourceDebugReportingPermission(JSONObject obj) throws JSONException { in hasSourceDebugReportingPermission() 319 JSONObject headersMapJson = in hasSourceDebugReportingPermission() 328 if (!(registerSourceObj instanceof JSONObject)) { in hasSourceDebugReportingPermission() [all …]
|
D | AttributionConfigTest.java | 36 import org.json.JSONObject; 166 JSONObject attributionConfigJson = createExampleAttributionConfigJson(); in build_missingSourceAdTech_throwsJsonException() 178 JSONObject attributionConfigJson = new JSONObject(); in build_withOnlySourceAdTechField_success() 198 private JSONObject createExampleAttributionConfigJson() throws JSONException { in createExampleAttributionConfigJson() 199 JSONObject attributionConfig = new JSONObject(); in createExampleAttributionConfigJson() 201 JSONObject sourcePriorityRangeJson = new JSONObject(); in createExampleAttributionConfigJson() 205 JSONObject sourceFiltersJson = new JSONObject(); in createExampleAttributionConfigJson() 211 JSONObject sourceNotFiltersJson = new JSONObject(); in createExampleAttributionConfigJson() 220 JSONObject filterDataJson = new JSONObject(); in createExampleAttributionConfigJson() 228 JSONObject sourceFiltersMap = new JSONObject(); in createExampleAttributionConfig() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/updateprocessors/ |
D | AppendTest.java | 46 import org.json.JSONObject; 85 JSONObject appendJson = new JSONObject(); in testAppendSingle() 89 JSONObject updatesJson = new JSONObject(); in testAppendSingle() 107 JSONObject appendJson = new JSONObject(); in testAppendMultipleValues() 111 JSONObject updatesJson = new JSONObject(); in testAppendMultipleValues() 134 JSONObject appendJson1 = new JSONObject(); in testAppendMultipleKeys() 138 JSONObject appendJson2 = new JSONObject(); in testAppendMultipleKeys() 142 JSONObject updatesJson = new JSONObject(); in testAppendMultipleKeys() 163 JSONObject appendJson = new JSONObject(); in testOverwriteExisting() 167 JSONObject updatesJson = new JSONObject(); in testOverwriteExisting() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/actions/ |
D | ReportObjects.java | 19 import org.json.JSONObject; 28 public final List<JSONObject> mEventReportObjects; 29 public final List<JSONObject> mAggregateReportObjects; 30 public final List<JSONObject> mDebugEventReportObjects; 31 public final List<JSONObject> mDebugAggregateReportObjects; 32 public final List<JSONObject> mDebugReportObjects; 43 List<JSONObject> eventReportObjects, in ReportObjects() 44 List<JSONObject> aggregateReportObjects, in ReportObjects() 45 List<JSONObject> debugEventReportObjects, in ReportObjects() 46 List<JSONObject> debugAggregateReportObjects, in ReportObjects() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | JsonUtilsTest.java | 27 import org.json.JSONObject; 37 JSONObject jsonObject = new JSONObject().put(KEY, VALID_VALUE); in testGetStringFromJsonSuccess() 52 JSONObject jsonObject = new JSONObject().put(KEY, VALID_VALUE); in testGetStringFromJsonThrowsJSONExceptionWhenKeyDoesNotExist() 64 JSONObject jsonObject = new JSONObject().put(KEY, 1); in testGetStringFromJsonThrowsJSONExceptionWhenValueIsNotString() 89 JSONObject jsonObject = new JSONObject().put(KEY, 1); in testGetStringFromJsonThrowsJSONExceptionWhenValueIsNotStringCustomError() 101 JSONObject innerObject = new JSONObject().put(KEY, VALID_VALUE); in testGetStringFromJsonThrowsJSONExceptionWhenValueIsJSONObject() 104 JSONObject jsonObject = new JSONObject().put(KEY, innerObject); in testGetStringFromJsonThrowsJSONExceptionWhenValueIsJSONObject()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/ |
D | InteractionUriRegistrationInfoTest.java | 32 import org.json.JSONObject; 50 JSONObject obj = new JSONObject(); in testFromJsonSucceeds() 64 JSONObject obj = new JSONObject(); in testFromJsonFailsWithWrongInteractionKeyName() 78 JSONObject obj = new JSONObject(); in testFromJsonFailsWithWrongInteractionReportingUriKeyName() 92 JSONObject obj = new JSONObject(); in testFromJsonFailsWhenInteractionKeyNotAString() 94 JSONObject innerObj = new JSONObject().put(INTERACTION_KEY_ARG_NAME, CLICK); in testFromJsonFailsWhenInteractionKeyNotAString() 109 JSONObject obj = new JSONObject(); in testFromJsonFailsWhenInteractionReportingUriNotAString() 112 JSONObject innerObj = in testFromJsonFailsWhenInteractionReportingUriNotAString() 113 new JSONObject() in testFromJsonFailsWhenInteractionReportingUriNotAString() 127 JSONObject obj = new JSONObject(); in testFromJsonWithEmptyListValueFails() [all …]
|
D | AdWithBidArgumentUtilTest.java | 36 import org.json.JSONObject; 55 private JSONObject aValidAdWithBidJson() throws JSONException { in aValidAdWithBidJson() 56 return new JSONObject() in aValidAdWithBidJson() 61 private JSONObject aValidAdWithBidWithAdCounterKeysJson() throws JSONException { in aValidAdWithBidWithAdCounterKeysJson() 62 return new JSONObject() in aValidAdWithBidWithAdCounterKeysJson() 96 final JSONObject adWithInvalidMetadata = in testShouldFailIfAdDataHasInvalidMetadata() 99 JSONObject adWithBidWithInvalidMetadata = in testShouldFailIfAdDataHasInvalidMetadata() 100 new JSONObject() in testShouldFailIfAdDataHasInvalidMetadata() 112 final JSONObject adWithInvalidMetadata = in testShouldFailIfAdDataHasInvalidMetadataParseWithCopier() 115 JSONObject adWithBidWithInvalidMetadata = in testShouldFailIfAdDataHasInvalidMetadataParseWithCopier() [all …]
|
D | DataVersionFetcherTest.java | 39 import org.json.JSONObject; 54 .setBody(new JSONObject()) 56 new JSONObject( 87 .setBody(new JSONObject()) in testGetBuyerDataVersionHeaderSuccessTakesFirstOfMultipleValues() 89 new JSONObject( in testGetBuyerDataVersionHeaderSuccessTakesFirstOfMultipleValues() 130 .setBody(new JSONObject()) in testGetBuyerDataVersionHeaderThrowsExceptionWhenMapDoesNotHaveUriKey() 132 new JSONObject( in testGetBuyerDataVersionHeaderThrowsExceptionWhenMapDoesNotHaveUriKey() 157 .setBody(new JSONObject()) in testGetBuyerDataVersionHeaderThrowsExceptionWhenHeadersDoNotHaveDataVersionKey() 159 new JSONObject( in testGetBuyerDataVersionHeaderThrowsExceptionWhenHeadersDoNotHaveDataVersionKey() 175 .setBody(new JSONObject()) in testGetBuyerDataVersionHeaderThrowsExceptionWhenHeadersDoNotHaveListValue() [all …]
|
D | AdDataArgumentUtilTest.java | 38 import org.json.JSONObject; 58 public static JSONObject aValidAdDataJson() throws JSONException { in aValidAdDataJson() 59 return new JSONObject() in aValidAdDataJson() 61 .put(AdDataArgumentUtil.METADATA_FIELD_NAME, new JSONObject(AD_DATA.getMetadata())); in aValidAdDataJson() 64 public static JSONObject aValidAdDataWithAdCounterKeysJson() throws JSONException { in aValidAdDataWithAdCounterKeysJson() 65 return new JSONObject() in aValidAdDataWithAdCounterKeysJson() 71 new JSONObject(AD_DATA_WITH_AD_COUNTER_KEYS.getMetadata())) in aValidAdDataWithAdCounterKeysJson() 102 JSONObject adDataWithInvalidMetadata = in testShouldFailIfAdDataHasInvalidMetadata() 113 JSONObject adDataWithInvalidMetadata = in testShouldFailIfAdDataHasInvalidMetadataParseWithCopier() 124 JSONObject adDataWithoutMetadata = aValidAdDataJson(); in testShouldFailIfAdDataIsMissingMetadata() [all …]
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | HalDeviceManagerUtil.java | 25 import org.json.JSONObject; 67 static JSONObject staticChipInfoToJson(@NonNull StaticChipInfo staticChipInfo) in staticChipInfoToJson() 69 JSONObject jsonObject = new JSONObject(); in staticChipInfoToJson() 80 static StaticChipInfo jsonToStaticChipInfo(JSONObject jsonObject) throws JSONException { in jsonToStaticChipInfo() 94 private static JSONObject chipModeToJson(WifiChip.ChipMode chipMode) in chipModeToJson() 96 JSONObject jsonObject = new JSONObject(); in chipModeToJson() 106 private static WifiChip.ChipMode jsonToChipMode(JSONObject jsonObject) throws JSONException { in jsonToChipMode() 119 private static JSONObject chipConcurrencyCombinationToJson( in chipConcurrencyCombinationToJson() 121 JSONObject jsonObject = new JSONObject(); in chipConcurrencyCombinationToJson() 131 JSONObject jsonObject) throws JSONException { in jsonToChipConcurrencyCombination() [all …]
|
D | AfcClient.java | 33 import org.json.JSONObject; 100 JSONObject httpResponseBodyJSON = new JSONObject(httpResponse.body()); in queryAfcServer() 154 JSONObject jsonRequestObject = getAfcRequestJSONObject(afcLocation); in getAfcHttpRequestObject() 162 private JSONObject getAfcRequestJSONObject(AfcLocation afcLocation) { in getAfcRequestJSONObject() 164 JSONObject requestObject = new JSONObject(); in getAfcRequestJSONObject() 166 JSONObject inquiryRequest = new JSONObject(); in getAfcRequestJSONObject() 170 JSONObject deviceDescriptor = new JSONObject(); in getAfcRequestJSONObject() 172 JSONObject certificationId = new JSONObject(); in getAfcRequestJSONObject() 179 JSONObject location = afcLocation.toJson(); in getAfcRequestJSONObject() 183 JSONObject range = new JSONObject(); in getAfcRequestJSONObject() [all …]
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/entitlement/response/ |
D | GetImsiPseudonymResponseTest.java | 34 import org.json.JSONObject; 53 JSONObject body1 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyCorrectWithRefreshInterval() 57 JSONObject body2 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyCorrectWithRefreshInterval() 77 JSONObject body1 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyCorrectWithoutRefreshInterval() 81 JSONObject body2 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyCorrectWithoutRefreshInterval() 108 JSONObject body1 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyInvalidRequest() 112 JSONObject body2 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyInvalidRequest() 129 JSONObject body1 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyAuthFailed() 133 JSONObject body2 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, in responseBodyAuthFailed() 150 JSONObject body2 = (new JSONObject()).put(Response.JSON_KEY_MESSAGE_ID, INVALID_MESSAGE_ID) in responseBodyWrongMessageId() [all …]
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/customaudience/ |
D | AdDataConversionStrategyFactory.java | 36 import org.json.JSONObject; 56 public void toJsonAdCounterKeys(DBAdData adData, JSONObject toReturn) throws JSONException { in toJsonAdCounterKeys() 64 public void toJsonFilters(FrequencyCapFilters frequencyCapFilters, JSONObject toReturn) in toJsonFilters() 72 public void fromJsonAdCounterKeys(JSONObject json, DBAdData.Builder adDataBuilder) in fromJsonAdCounterKeys() 85 public void fromJsonFilters(JSONObject json, AdFilters.Builder builder) in fromJsonFilters() 109 public void toJsonAdCounterKeys(DBAdData adData, JSONObject toReturn) throws JSONException { in toJsonAdCounterKeys() 114 public void toJsonFilters(FrequencyCapFilters frequencyCapFilters, JSONObject toReturn) in toJsonFilters() 120 public void fromJsonAdCounterKeys(JSONObject json, DBAdData.Builder adDataBuilder) { in fromJsonAdCounterKeys() 125 public void fromJsonFilters(JSONObject json, AdFilters.Builder builder) in fromJsonFilters() 145 public void toJson(AppInstallFilters appInstallFilters, JSONObject toReturn) in toJson() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ |
D | FetcherUtilTest.java | 47 import org.json.JSONObject; 176 JSONObject obj = new JSONObject().put(KEY, unsignedLongString); in extractUnsignedLong_maxValue_success() 184 JSONObject obj = new JSONObject().put(KEY, "-123"); in extractUnsignedLong_negative_returnsEmpty() 190 JSONObject obj = new JSONObject().put(KEY, 123); in extractUnsignedLong_notAString_returnsEmpty() 196 JSONObject obj = new JSONObject().put(KEY, "18446744073709551616"); in extractUnsignedLong_tooLarge_returnsEmpty() 202 JSONObject obj = new JSONObject().put(KEY, "123p"); in extractUnsignedLong_notAnInt_returnsEmpty() 216 assertFalse(FetcherUtil.is64BitInteger(new JSONObject())); in is64BitInteger_various() 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() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/ |
D | XnaSourceCreatorTest.java | 41 import org.json.JSONObject; 83 Collections.singletonList(new JSONObject(buildMatchingFilterData(false)))); in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 92 new JSONObject(buildMatchingFilterData(false))) in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 108 new JSONObject( in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 122 new JSONObject(buildMatchingFilterData(false))) in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 144 JSONObject aggregatableSource = new JSONObject(); in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 163 JSONObject derivedAggregatableSource1 = new JSONObject(); in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 201 JSONObject derivedAggregatableSource2 = new JSONObject(); in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 255 .setAggregateSource(new JSONObject().toString()) in generateDerivedSources_withVarietyOfSources_filtersAndGeneratesSources() 320 Collections.singletonList(new JSONObject(buildMatchingFilterData(false)))); in generateDerivedSources_sharedDebugKeyDisabled_doesntAddDebugKeyToDerivedSource() [all …]
|
/packages/services/Car/car-lib/src/android/car/vms/ |
D | VmsOperationRecorder.java | 27 import org.json.JSONObject; 193 write(new JSONObject().put(operation, new JSONObject())); in recordOp() 203 recordOp(operation, new JSONObject().put("layer", toJson(layer))); in recordOp() 213 JSONObject args = new JSONObject(); in recordOp() 229 recordOp(operation, new JSONObject().put(intArgName, arg)); in recordOp() 240 new JSONObject().put(intArgName, arg).put("layer", toJson(layer))); in recordOp() 247 private void recordOp(String operation, JSONObject args) { in recordOp() 250 write(new JSONObject().put(operation, args)); in recordOp() 257 private static JSONObject toJson(VmsLayer layer) throws JSONException { in toJson() 258 return new JSONObject() in toJson() [all …]
|
/packages/apps/Settings/src/com/android/settings/ |
D | SettingsDumpService.java | 46 import org.json.JSONObject; 92 JSONObject dump = new JSONObject(); in dump() 112 private JSONObject dumpMemory() throws JSONException { in dumpMemory() 113 JSONObject obj = new JSONObject(); in dumpMemory() 126 private JSONObject dumpDataUsage() throws JSONException { in dumpDataUsage() 127 JSONObject obj = new JSONObject(); in dumpDataUsage() 137 final JSONObject usage = dumpDataUsage(template, controller); in dumpDataUsage() 155 private JSONObject dumpDataUsage(NetworkTemplate template, DataUsageController controller) in dumpDataUsage() 157 JSONObject obj = new JSONObject(); in dumpDataUsage() 167 private JSONObject dumpStorage() throws JSONException { in dumpStorage() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/download/ |
D | EncryptionKeyConverterUtilTest.java | 36 import org.json.JSONObject; 69 createEncryptionKeyFromJson(new JSONObject(SIGNING_V3_DEFAULT_VALUES)); in createEncryptionKeyFromJson_signing_successVersion3() 87 JSONObject jsonObject = new JSONObject(SIGNING_V3_DEFAULT_VALUES); in createEncryptionKeyFromJson_encryption_successVersion3() 110 JSONObject jsonObject = new JSONObject(SIGNING_V3_DEFAULT_VALUES); in createEncryptionKeyFromJson_incorrectVersion() 123 JSONObject jsonObject = new JSONObject(SIGNING_V3_DEFAULT_VALUES); in createEncryptionKeyFromJson_incorrectKeyType() 136 JSONObject jsonObject = new JSONObject(SIGNING_V3_DEFAULT_VALUES); in createEncryptionKeyFromJson_incorrectProtocolType() 149 JSONObject jsonObject = new JSONObject(SIGNING_V3_DEFAULT_VALUES); in createEncryptionKeyFromJson_incorrectKeyIdFormat() 162 JSONObject jsonObject = new JSONObject(SIGNING_V3_DEFAULT_VALUES); in createEncryptionKeyFromJson_incorrectExpirationFormat() 175 JSONObject jsonObject = new JSONObject(SIGNING_V3_DEFAULT_VALUES); in createEncryptionKeyFromJson_missingFields()
|
/packages/apps/UniversalMediaPlayer/java/com/android/pump/provider/ |
D | KnowledgeGraph.java | 40 import org.json.JSONObject; 60 JSONObject result = getResultFromKG(artist.getName(), "Person", "MusicGroup"); in populateArtist() 81 JSONObject result = getResultFromKG(album.getTitle(), "MusicAlbum"); in populateAlbum() 98 JSONObject result = getResultFromKG(movie.getTitle(), "Movie"); in populateMovie() 114 JSONObject result = getResultFromKG(series.getTitle(), "TVSeries"); in populateSeries() 130 JSONObject result = getResultFromKG(episode.getSeries().getTitle(), "TVEpisode"); in populateEpisode() 143 private @NonNull JSONObject getResultFromKG(String title, String... types) throws IOException { in getResultFromKG() 145 JSONObject root = (JSONObject) getContent(getContentUri(title, types)); in getResultFromKG() 147 JSONObject item = (JSONObject) items.get(0); in getResultFromKG() 148 JSONObject result = item.getJSONObject("result"); in getResultFromKG() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/ |
D | UpdateProcessingOrchestratorTest.java | 50 import org.json.JSONObject; 108 ADTECH, PACKAGE, NOW, new JSONObject(), DEV_CONTEXT, mUpdateSignalsApiCalledStats); in testUpdatesProcessorEmptyJson() 140 JSONObject commandToNumber = new JSONObject(); in testUpdatesProcessorBadJson() 165 JSONObject json = new JSONObject(); in testUpdatesProcessorSingleInsert() 166 json.put(TEST_PROCESSOR, new JSONObject()); in testUpdatesProcessorSingleInsert() 195 JSONObject json = new JSONObject(); in testUpdatesProcessorSingleInsertJsonArray() 227 JSONObject json = new JSONObject(); in testUpdatesProcessorSingleRemove() 228 json.put(TEST_PROCESSOR, new JSONObject()); in testUpdatesProcessorSingleRemove() 252 JSONObject json = new JSONObject(); in testUpdatesProcessorTwoInserts() 253 json.put(TEST_PROCESSOR + 1, new JSONObject()); in testUpdatesProcessorTwoInserts() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/shell/customaudience/ |
D | CustomAudienceHelperTest.java | 38 import org.json.JSONObject; 54 JSONObject jsonObject = in testCustomAudienceFromJson_happyPath() 55 new JSONObject() in testCustomAudienceFromJson_happyPath() 108 JSONObject jsonObject = in testCustomAudienceBackgroundFetchDataFromJson_happyPath() 109 new JSONObject() in testCustomAudienceBackgroundFetchDataFromJson_happyPath() 116 new JSONObject() in testCustomAudienceBackgroundFetchDataFromJson_happyPath() 161 JSONObject jsonObject = in testGetBackgroundFetchDataFromJson_withoutDailyUpdate_throwsIllegalStateException() 162 new JSONObject() in testGetBackgroundFetchDataFromJson_withoutDailyUpdate_throwsIllegalStateException() 180 JSONObject jsonObject = in testToAndFromJson_happyPath_success() 198 JSONObject jsonObject = in testToJson_withNullTrustedBiddingData_fieldNotPresent() [all …]
|