Home
last modified time | relevance | path

Searched refs:JSONObject (Results 1 – 25 of 120) sorted by relevance

12345

/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/signedconfig/
H A DSignedConfigTest.java78 JSONObject json = new JSONObject("{\"max_sdk\": 3, \"values\": {}}"); in testParsePerSdkConfigNoMinSdk()
89 JSONObject json = new JSONObject("{\"min_sdk\": 1, \"values\": {}}"); in testParsePerSdkConfigNoMaxSdk()
154 JSONObject json = new JSONObject( in testParsePerSdkConfigSingleKey()
164 JSONObject json = new JSONObject( in testParsePerSdkConfigSingleKeyNullValue()
175 JSONObject json = new JSONObject( in testParsePerSdkConfigMultiKeys()
184 JSONObject json = new JSONObject( in testParsePerSdkConfigSingleKeyNotAllowed()
197 JSONObject json = new JSONObject( in testParsePerSdkConfigSingleKeyWithMap()
206 JSONObject json = new JSONObject( in testParsePerSdkConfigSingleKeyWithMapInvalidValue()
219 JSONObject json = new JSONObject( in testParsePerSdkConfigMultiKeysWithMap()
229 JSONObject json = new JSONObject( in testParsePerSdkConfigSingleKeyWithMapToNull()
[all …]
/aosp12/packages/apps/Settings/src/com/android/settings/
H A DSettingsDumpService.java43 import org.json.JSONObject;
73 JSONObject dump = new JSONObject(); in dump()
89 private JSONObject dumpMemory() throws JSONException { in dumpMemory()
90 JSONObject obj = new JSONObject(); in dumpMemory()
103 private JSONObject dumpDataUsage() throws JSONException { in dumpDataUsage()
104 JSONObject obj = new JSONObject(); in dumpDataUsage()
140 JSONObject obj = new JSONObject(); in dumpDataUsage()
150 private JSONObject dumpStorage() throws JSONException { in dumpStorage()
151 JSONObject obj = new JSONObject(); in dumpStorage()
154 JSONObject volObj = new JSONObject(); in dumpStorage()
[all …]
/aosp12/packages/services/Car/car-lib/src/android/car/vms/
H A DVmsOperationRecorder.java26 import org.json.JSONObject;
192 write(new JSONObject().put(operation, new JSONObject())); in recordOp()
202 recordOp(operation, new JSONObject().put("layer", toJson(layer))); in recordOp()
212 JSONObject args = new JSONObject(); in recordOp()
228 recordOp(operation, new JSONObject().put(intArgName, arg)); in recordOp()
246 private void recordOp(String operation, JSONObject args) { in recordOp()
249 write(new JSONObject().put(operation, args)); in recordOp()
256 private static JSONObject toJson(VmsLayer layer) throws JSONException { in toJson()
257 return new JSONObject() in toJson()
264 JSONObject dep = new JSONObject(); in toJson()
[all …]
/aosp12/packages/apps/UniversalMediaPlayer/java/com/android/pump/provider/
H A DKnowledgeGraph.java40 import org.json.JSONObject;
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()
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()
158 private @Nullable String getImageUrl(@NonNull JSONObject result) { in getImageUrl()
161 JSONObject imageObj = result.optJSONObject("image"); in getImageUrl()
175 private @Nullable String getDescription(@NonNull JSONObject result) { in getDescription()
[all …]
H A DOmdbApi.java35 import org.json.JSONObject;
70 JSONObject root = (JSONObject) getContent(getContentUri(movie)); in populateMovie()
84 JSONObject root = (JSONObject) getContent(getContentUri(series)); in populateSeries()
97 JSONObject root = (JSONObject) getContent(getContentUri(episode)); in populateEpisode()
H A DWikidata.java30 import org.json.JSONObject;
81 JSONObject resultRoot = (JSONObject) root; in getSearchResults()
120 JSONObject resultRoot = (JSONObject) root; in getSparqlForResults()
218 if (object == JSONObject.NULL) { in dumpJson()
220 } else if (object instanceof JSONObject) { in dumpJson()
222 JSONObject jsonObject = (JSONObject) object; in dumpJson()
/aosp12/frameworks/base/services/core/java/com/android/server/rollback/
H A DRollbackStore.java41 import org.json.JSONObject;
138 JSONObject jo = new JSONObject(); in convertToJsonArray()
153 JSONObject jo = array.getJSONObject(i); in convertToRestoreInfoArray()
167 JSONObject entryJson = new JSONObject(); in extensionVersionsToJson()
182 JSONObject entry = json.getJSONObject(i); in extensionVersionsFromJson()
190 JSONObject json = new JSONObject(); in rollbackInfoToJson()
312 JSONObject dataJson = new JSONObject(); in saveRollback()
367 JSONObject dataJson = new JSONObject( in loadRollback()
377 static Rollback rollbackFromJson(JSONObject dataJson, File backupDir) in rollbackFromJson()
393 JSONObject json = new JSONObject(); in toJson()
[all …]
/aosp12/packages/services/Car/tests/carservice_test/src/com/android/car/
H A DVmsOperationRecorderTest.java32 import org.json.JSONObject;
204 JSONObject expect = new JSONObject(expectJson.replace("'", "\"")); in assertJsonMsgEquals()
205 JSONObject got = new JSONObject(mWriter.mMsg); in assertJsonMsgEquals()
214 private boolean similar(JSONObject expect, JSONObject got) { in similar()
232 if (valueExpect instanceof JSONObject) { in similar()
233 return similar((JSONObject) valueExpect, (JSONObject) valueGot); in similar()
246 if (similar((JSONObject) expectArray.get(i), in similar()
247 (JSONObject) gotArray.get(j))) { in similar()
/aosp12/packages/apps/Dialer/java/com/android/dialer/glidephotomanager/impl/
H A DDefaultLookupUriGenerator.java27 import org.json.JSONObject;
47 JSONObject lookupJson = new JSONObject(); in generateUri()
52 JSONObject contactRows = new JSONObject(); in generateUri()
53 JSONObject phone = new JSONObject(); in generateUri()
/aosp12/frameworks/base/core/java/com/android/server/backup/
H A DAccountSyncSettingsBackupHelper.java34 import org.json.JSONObject;
101 JSONObject dataJSON = serializeAccountSyncSettingsToJSON(mUserId); in performBackup()
130 private JSONObject serializeAccountSyncSettingsToJSON(int userId) throws JSONException { in serializeAccountSyncSettingsToJSON()
150 JSONObject backupJSON = new JSONObject(); in serializeAccountSyncSettingsToJSON()
165 JSONObject accountJSON = new JSONObject(); in serializeAccountSyncSettingsToJSON()
176 JSONObject authorityJSON = new JSONObject(); in serializeAccountSyncSettingsToJSON()
258 JSONObject dataJSON = new JSONObject(dataString); in restoreEntity()
286 JSONObject accountJSON = (JSONObject) accountJSONArray.get(i); in restoreFromJsonArray()
403 private void restoreExistingAccountSyncSettingsFromJSON(JSONObject accountJSON, int userId) in restoreExistingAccountSyncSettingsFromJSON()
412 JSONObject authority = (JSONObject) authorities.get(i); in restoreExistingAccountSyncSettingsFromJSON()
/aosp12/packages/services/Car/tests/DiagnosticTools/src/com/google/android/car/diagnostictools/utils/
H A DJsonMetadataReader.java24 import org.json.JSONObject;
61 JSONObject metadataMapping = new JSONObject(inputStreamToString(in)); in readDTCsFromJson()
82 JSONObject metadataMapping = new JSONObject(inputStreamToString(in)); in readECUsFromJson()
164 JSONObject metadataMapping = new JSONObject(inputStreamToString(in)); in readSensorsFromJson()
H A DSensorMetadata.java24 import org.json.JSONObject;
121 static SensorMetadata buildFromJson(JSONObject json) { in buildFromJson()
127 JSONObject conversionObject = json.getJSONObject(CONVERSION_KEY); in buildFromJson()
156 private static String readStringFromJSON(String key, JSONObject json) { in readStringFromJSON()
176 private static float readFloatFromJSON(String key, JSONObject json) throws JSONException { in readFloatFromJSON()
199 private static Map<Integer, String> readMappingFromJSON(String key, JSONObject json) in readMappingFromJSON()
/aosp12/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
H A DJsonBackedSuggestionExtras.java19 import org.json.JSONObject;
33 private final JSONObject mExtras;
37 mExtras = new JSONObject(json); in JsonBackedSuggestionExtras()
46 mExtras = new JSONObject(); in JsonBackedSuggestionExtras()
50 mExtras.put(column, value == null ? JSONObject.NULL : value); in JsonBackedSuggestionExtras()
/aosp12/packages/apps/ThemePicker/src/com/android/customization/model/clock/
H A DClockManager.java25 import org.json.JSONObject;
50 final JSONObject json = new JSONObject(); in handleApply()
72 final JSONObject json = new JSONObject(value); in lookUpCurrentClock()
/aosp12/packages/apps/Car/tests/TestMediaApp/src/com/android/car/media/testmediaapp/loader/
H A DTmaLoaderUtils.java26 import org.json.JSONObject;
50 static JSONObject jsonFromAsset(Context context, String assetPathName) { in jsonFromAsset()
53 return (jsonString != null) ? new JSONObject(jsonString) : null; in jsonFromAsset()
72 JSONObject json, K key, Map<String, E> enumMap, E fallback) { in getEnum()
79 static <T extends Enum> JSONArray getArray(JSONObject json, T key) { in getArray()
89 static <T extends Enum, U extends Enum> List<U> getEnumArray(JSONObject json, T key, in getEnumArray()
107 static <T extends Enum> String getString(JSONObject json, T key) { in getString()
117 static <T extends Enum> int getInt(JSONObject json, T key) { in getInt()
/aosp12/packages/apps/Test/connectivity/PMC/src/com/android/pmc/
H A DPMCStatusLogger.java23 import org.json.JSONObject;
38 public static JSONObject mJObject;
56 mJObject = new JSONObject(); in PMCStatusLogger()
84 JSONObject obj = new JSONObject(); in logAlarmTimes()
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/clock/
H A DSettingsWrapperTest.kt23 import org.json.JSONObject
65 val json: JSONObject = JSONObject()
78 val json: JSONObject = JSONObject()
/aosp12/frameworks/base/services/core/java/com/android/server/signedconfig/
H A DSignedConfig.java23 import org.json.JSONObject;
128 JSONObject json = new JSONObject(config); in parse()
154 static PerSdkConfig parsePerSdkConfig(JSONObject json, Set<String> allowedKeys, in parsePerSdkConfig()
159 JSONObject valuesJson = json.getJSONObject(CONFIG_KEY_VALUES); in parsePerSdkConfig()
163 String value = valueObject == JSONObject.NULL || valueObject == null in parsePerSdkConfig()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/
H A DSettingsWrapper.java26 import org.json.JSONObject;
83 JSONObject json; in decode()
85 json = new JSONObject(value); in decode()
127 JSONObject json = new JSONObject(); in migrate()
/aosp12/frameworks/base/core/java/com/android/internal/protolog/
H A DProtoLogViewerConfigReader.java23 import org.json.JSONObject;
90 JSONObject json = new JSONObject(builder.toString()); in loadViewerConfig()
91 JSONObject messages = json.getJSONObject("messages"); in loadViewerConfig()
99 JSONObject val = messages.getJSONObject(key); in loadViewerConfig()
/aosp12/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/http/
H A DHttpRequest.java28 import org.json.JSONObject;
42 public abstract JSONObject postData(); in postData()
70 public abstract Builder setPostData(JSONObject postData); in setPostData()
110 .setPostData(new JSONObject()) in builder()
/aosp12/frameworks/base/services/core/java/com/android/server/storage/
H A DDiskStatsFileLogger.java29 import org.json.JSONObject;
90 JSONObject representation = getJsonRepresentation(); in dumpToFile()
97 private JSONObject getJsonRepresentation() { in getJsonRepresentation()
98 JSONObject json = new JSONObject(); in getJsonRepresentation()
116 private void addAppsToJson(JSONObject json) throws JSONException { in addAppsToJson()
/aosp12/packages/apps/ThemePicker/robolectric_tests/src/com/android/customization/model/clock/
H A DClockManagerTest.java33 import org.json.JSONObject;
80 JSONObject json = in testApply()
81 new JSONObject(Secure.getString(mContentResolver, ClockManager.CLOCK_FACE_SETTING)); in testApply()
99 JSONObject json = new JSONObject().put(CLOCK_FIELD, CLOCK_ID); in testGetCurrentClock_returnsClockId()
/aosp12/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
H A DJsonParser.java24 import org.json.JSONObject;
41 public static JSONObject parse(JsonReader reader) throws IOException, JSONException { in parse()
42 JSONObject output = new JSONObject(); in parse()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
H A DDiskStatsFileLoggerTest.java24 import org.json.JSONObject;
63 JSONObject output = getOutputFileAsJson(); in testEmptyStorage()
89 JSONObject output = getOutputFileAsJson(); in testMeasurementResultsReported()
115 JSONObject output = getOutputFileAsJson(); in testAppsReported()
151 JSONObject output = getOutputFileAsJson(); in testEmulatedExternalStorageCounted()
177 JSONObject output = getOutputFileAsJson(); in testDuplicatePackageNameIsNotMergedAcrossMultipleUsers()
193 private JSONObject getOutputFileAsJson() throws Exception { in getOutputFileAsJson()
194 return new JSONObject(IoUtils.readFileAsString(mOutputFile.getAbsolutePath())); in getOutputFileAsJson()

12345