Home
last modified time | relevance | path

Searched refs:fromJson (Results 1 – 25 of 29) sorted by relevance

12

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/customaudience/
DCustomAudienceConvertersTest.java52 assertThrows(RuntimeException.class, () -> mConverters.fromJson(" ")); in testDeserialize_invalidString()
63 List<DBAdData> output = mConverters.fromJson(serializedString); in testSerializeAndDeserialize_runNormally()
74 List<DBAdData> output = mConverters.fromJson(serializedString); in testSerializeAndDeserialize_runNormallyNoFilters()
91 List<DBAdData> output = noFilterConverter.fromJson(serializedString); in testSerializeAndDeserialize_filtersDisabled()
108 List<DBAdData> output = mConverters.fromJson(serializedString); in testSerializeAndDeserialize_toJsonFiltersDisabled()
125 List<DBAdData> output = noFilterConverter.fromJson(serializedString); in testSerializeAndDeserialize_fromJsonFiltersDisabled()
146 List<DBAdData> output = mConverters.fromJson(serializedString); in testSerializeAndDeserialize_toJsonRenderIdDisabled()
167 List<DBAdData> output = noRenderIdConverter.fromJson(serializedString); in testSerializeAndDeserialize_fromJsonRenderIdDisabled()
183 List<DBAdData> output = mConverters.fromJson(serializedString); in testSerializeAndDeserialize_toJsonRenderIdEnabled()
199 List<DBAdData> output = noRenderIdConverter.fromJson(serializedString); in testSerializeAndDeserialize_fromJsonRenderIdEnabled()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/framework/src/android/adservices/common/
DInternalFrequencyCapFiltersTest.java55 assertThat(FrequencyCapFilters.fromJson(originalFilters.toJson())) in testJsonSerialization()
65 assertThat(FrequencyCapFilters.fromJson(json).getKeyedFrequencyCapsForWinEvents()) in testJsonSerializationEmptyWins()
75 assertThat(FrequencyCapFilters.fromJson(json).getKeyedFrequencyCapsForImpressionEvents()) in testJsonSerializationEmptyImpressions()
85 assertThat(FrequencyCapFilters.fromJson(json).getKeyedFrequencyCapsForViewEvents()) in testJsonSerializationEmptyViews()
95 assertThat(FrequencyCapFilters.fromJson(json).getKeyedFrequencyCapsForClickEvents()) in testJsonSerializationEmptyClicks()
107 assertThrows(JSONException.class, () -> FrequencyCapFilters.fromJson(json)); in testJsonSerializationNonStringKeyedFrequencyCap()
114 assertThrows(JSONException.class, () -> FrequencyCapFilters.fromJson(json)); in testJsonSerializationWrongType()
123 assertEquals(originalFilters, FrequencyCapFilters.fromJson(originalFilters.toJson())); in testJsonSerializationUnrelatedKey()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/customaudience/
DAdDataConversionStrategyFactory.java89 FrequencyCapFilters.fromJson(json.getJSONObject(FREQUENCY_CAP_FIELD_NAME))); in fromJsonFilters()
153 public void fromJson(JSONObject json, AdFilters.Builder builder) throws JSONException { in fromJson() method in AdDataConversionStrategyFactory.AppInstallConversionImpl
156 AppInstallFilters.fromJson(json.getJSONObject(APP_INSTALL_FIELD_NAME))); in fromJson()
174 public void fromJson(JSONObject json, AdFilters.Builder builder) throws JSONException { in fromJson() method in AdDataConversionStrategyFactory.AppInstallConversionNoOp
217 public void fromJson(@NonNull JSONObject json, @NonNull DBAdData.Builder adDataBuilder) in fromJson() method in AdDataConversionStrategyFactory.FilteringEnabledConversionStrategy
225 mAppInstallFiltersConversionStrategy.fromJson(adFiltersObject, builder); in fromJson()
259 public void fromJson(@NonNull JSONObject json, @NonNull DBAdData.Builder adDataBuilder) in fromJson() method in AdDataConversionStrategyFactory.AdRenderIdEnabledConversionStrategy
299 public DBAdData.Builder fromJson(JSONObject json) throws JSONException { in fromJson() method in AdDataConversionStrategyFactory.BaseConversionStrategy
341 public DBAdData.Builder fromJson(JSONObject json) throws JSONException { in fromJson() method in AdDataConversionStrategyFactory.CompositeConversionStrategy
342 DBAdData.Builder result = mBaseStrategy.fromJson(json); in fromJson()
[all …]
DAdDataConversionStrategy.java44 DBAdData.Builder fromJson(JSONObject json) throws JSONException; in fromJson() method
DAdDataOptionalConversionStrategy.java44 void fromJson(JSONObject json, DBAdData.Builder adDataBuilder) throws JSONException; in fromJson() method
DAppInstallFiltersConversionStrategy.java38 void fromJson(JSONObject json, AdFilters.Builder builder) throws JSONException; in fromJson() method
DDBCustomAudience.java656 public List<DBAdData> fromJson(String json) { in fromJson() method in DBCustomAudience.Converters
668 result.add(mAdDataConversionStrategy.fromJson(jsonObject).build()); in fromJson()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DInteractionUriRegistrationInfoTest.java55 InteractionUriRegistrationInfo.fromJson(obj); in testFromJsonSucceeds()
72 InteractionUriRegistrationInfo.fromJson(obj); in testFromJsonFailsWithWrongInteractionKeyName()
86 InteractionUriRegistrationInfo.fromJson(obj); in testFromJsonFailsWithWrongInteractionReportingUriKeyName()
103 InteractionUriRegistrationInfo.fromJson(obj); in testFromJsonFailsWhenInteractionKeyNotAString()
121 InteractionUriRegistrationInfo.fromJson(obj); in testFromJsonFailsWhenInteractionReportingUriNotAString()
135 InteractionUriRegistrationInfo.fromJson(obj); in testFromJsonWithEmptyListValueFails()
151 InteractionUriRegistrationInfo.fromJson(obj); in testFromJsonWithPopulatedListValueFails()
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/debuggablects/
DCustomAudienceShellCommandsE2ETest.java19 import static android.adservices.debuggablects.CustomAudienceShellCommandHelper.fromJson;
118 fromJson(customAudiences.getJSONObject(0)), in testRun_listCustomAudience_happyPath()
119 fromJson(customAudiences.getJSONObject(1)))) in testRun_listCustomAudience_happyPath()
121 assertThat(fromJson(customAudiencesAfterLeaving.getJSONObject(0))) in testRun_listCustomAudience_happyPath()
146 CustomAudience parsedCustomAudience = fromJson(customAudience); in testRun_viewCustomAudience_happyPath()
DCustomAudienceShellCommandHelper.java61 static CustomAudience fromJson(@NonNull JSONObject jsonObject) throws JSONException { in fromJson() method in CustomAudienceShellCommandHelper
124 AdFilters.fromJson(new JSONObject(jsonObject.getString(ADS_AD_FILTERS)))); in getAdFromJson()
DCustomAudienceShellCommandsScenarioTest.java111 return CustomAudienceShellCommandHelper.fromJson( in getCustomAudience()
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/cts/
DKeyedFrequencyCapTest.java339 assertEquals(toSerialize, KeyedFrequencyCap.fromJson(toSerialize.toJson())); in testJsonSerialization()
352 () -> KeyedFrequencyCap.fromJson(json)); in testJsonSerializationInvalidKeyThrows()
363 assertThrows(JSONException.class, () -> KeyedFrequencyCap.fromJson(json)); in testJsonSerializationMissingAdCounterKey()
374 assertThrows(JSONException.class, () -> KeyedFrequencyCap.fromJson(json)); in testJsonSerializationMissingMaxCount()
385 assertThrows(JSONException.class, () -> KeyedFrequencyCap.fromJson(json)); in testJsonSerializationMissingIntervalInSeconds()
/packages/modules/AdServices/adservices/framework/java/android/adservices/common/
DAdFilters.java146 public static AdFilters fromJson(JSONObject json) throws JSONException { in fromJson() method in AdFilters
150 FrequencyCapFilters.fromJson(json.getJSONObject(FREQUENCY_CAP_FIELD_NAME))); in fromJson()
154 AppInstallFilters.fromJson(json.getJSONObject(APP_INSTALL_FIELD_NAME))); in fromJson()
DFrequencyCapFilters.java275 public static FrequencyCapFilters fromJson(JSONObject json) throws JSONException { in fromJson() method in FrequencyCapFilters
300 toReturn.add(KeyedFrequencyCap.fromJson(json.getJSONObject(i))); in jsonArrayToFcapList()
DAppInstallFilters.java135 public static AppInstallFilters fromJson(JSONObject json) throws JSONException { in fromJson() method in AppInstallFilters
DKeyedFrequencyCap.java171 public static KeyedFrequencyCap fromJson(JSONObject json) throws JSONException { in fromJson() method in KeyedFrequencyCap
/packages/apps/Settings/src/com/android/settings/localepicker/
DLocaleNotificationDataManager.java95 return json.isEmpty() ? null : gson.fromJson(json, NotificationInfo.class); in getNotificationInfo()
108 result.put(key, gson.fromJson(value, NotificationInfo.class)); in getLocaleNotificationInfoMap()
/packages/modules/NetworkStack/apishim/30/com/android/networkstack/apishim/api30/
DCaptivePortalDataShimImpl.java60 public static CaptivePortalDataShim fromJson(JSONObject obj) throws JSONException, in fromJson() method in CaptivePortalDataShimImpl
63 return com.android.networkstack.apishim.api29.CaptivePortalDataShimImpl.fromJson(obj); in fromJson()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/customaudience/
DReadFiltersFromJsonStrategyFactory.java123 FrequencyCapFilters.fromJson(json.getJSONObject(FREQUENCY_CAP_FIELD_NAME))); in readFrequencyCapFilters()
152 AppInstallFilters.fromJson(json.getJSONObject(APP_INSTALL_FIELD_NAME))); in readAppInstallFilters()
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/fledge/utils/
DFakeAdExchangeServer.java102 return sGson.fromJson(jsonString, SelectAdRequest.class); in getSelectAdRequestWithContextualSignals()
106 return new GsonBuilder().create().fromJson(jsonString, SelectAdResponse.class); in parseSelectAdResponse()
/packages/services/Car/tools/emulator/
Dobd2_to_diagjson.py147 def fromJson(cls, json): member in Event
224 source_event = Event.fromJson(source_json_event)
/packages/modules/NetworkStack/apishim/29/com/android/networkstack/apishim/api29/
DCaptivePortalDataShimImpl.java50 public static CaptivePortalDataShim fromJson(JSONObject object) throws JSONException, in fromJson() method in CaptivePortalDataShimImpl
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/
DInteractionUriRegistrationInfo.java59 public static InteractionUriRegistrationInfo fromJson(@NonNull JSONObject jsonObject) in fromJson() method in InteractionUriRegistrationInfo
/packages/services/Car/service/src/com/android/car/storagemonitoring/
DWearHistory.java65 public static WearHistory fromJson(@NonNull File in) throws IOException, JSONException { in fromJson() method in WearHistory
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/
DNetworkValidationMetricsTest.java172 ? CaptivePortalDataShimImpl.fromJson(info) : null; in testNetworkValidationMetrics_VerifyCollectMetrics()

12