Home
last modified time | relevance | path

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

123

/packages/apps/Settings/src/com/android/settings/
DSettingsDumpService.java44 import org.json.JSONObject;
74 JSONObject dump = new JSONObject(); in dump()
90 private JSONObject dumpMemory() throws JSONException { in dumpMemory()
91 JSONObject obj = new JSONObject(); in dumpMemory()
104 private JSONObject dumpDataUsage() throws JSONException { in dumpDataUsage()
105 JSONObject obj = new JSONObject(); in dumpDataUsage()
115 final JSONObject usage = dumpDataUsage(template, controller); in dumpDataUsage()
133 private JSONObject dumpDataUsage(NetworkTemplate template, DataUsageController controller) in dumpDataUsage()
135 JSONObject obj = new JSONObject(); in dumpDataUsage()
145 private JSONObject dumpStorage() throws JSONException { in dumpStorage()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DHalDeviceManagerUtil.java24 import org.json.JSONObject;
66 static JSONObject staticChipInfoToJson(@NonNull StaticChipInfo staticChipInfo) in staticChipInfoToJson()
68 JSONObject jsonObject = new JSONObject(); in staticChipInfoToJson()
80 static StaticChipInfo jsonToStaticChipInfo(JSONObject jsonObject) throws JSONException { in jsonToStaticChipInfo()
95 private static JSONObject chipModeToJson(android.hardware.wifi.V1_6.IWifiChip.ChipMode chipMode) in chipModeToJson()
97 JSONObject jsonObject = new JSONObject(); in chipModeToJson()
109 JSONObject jsonObject) throws JSONException { in jsonToChipMode()
124 private static JSONObject chipConcurrencyCombinationToJson( in chipConcurrencyCombinationToJson()
126 JSONObject jsonObject = new JSONObject(); in chipConcurrencyCombinationToJson()
136 JSONObject jsonObject) throws JSONException { in jsonToChipConcurrencyCombination()
[all …]
/packages/services/Car/car-lib/src/android/car/vms/
DVmsOperationRecorder.java27 import org.json.JSONObject;
210 write(new JSONObject().put(operation, new JSONObject())); in recordOp()
220 recordOp(operation, new JSONObject().put("layer", toJson(layer))); in recordOp()
230 JSONObject args = new JSONObject(); in recordOp()
246 recordOp(operation, new JSONObject().put(intArgName, arg)); in recordOp()
257 new JSONObject().put(intArgName, arg).put("layer", toJson(layer))); in recordOp()
264 private void recordOp(String operation, JSONObject args) { in recordOp()
267 write(new JSONObject().put(operation, args)); in recordOp()
274 private static JSONObject toJson(VmsLayer layer) throws JSONException { in toJson()
275 return new JSONObject() in toJson()
[all …]
/packages/apps/UniversalMediaPlayer/java/com/android/pump/provider/
DKnowledgeGraph.java40 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 …]
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()
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()
/packages/services/Car/tests/carservice_test/src/com/android/car/
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()
/packages/apps/Dialer/java/com/android/dialer/glidephotomanager/impl/
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()
/packages/services/Car/tests/DiagnosticTools/src/com/google/android/car/diagnostictools/utils/
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()
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()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
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()
/packages/apps/ThemePicker/src/com/android/customization/model/clock/
DClockManager.java25 import org.json.JSONObject;
50 final JSONObject json = new JSONObject(); in handleApply()
72 final JSONObject json = new JSONObject(value); in lookUpCurrentClock()
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/
DPMCStatusLogger.java23 import org.json.JSONObject;
38 public static JSONObject mJObject;
56 mJObject = new JSONObject(); in PMCStatusLogger()
84 JSONObject obj = new JSONObject(); in logAlarmTimes()
/packages/modules/Virtualization/tests/hostside/java/android/virt/test/
DMicrodroidTestCase.java45 import org.json.JSONObject;
126 private static JSONObject newPartition(String label, String path) { in newPartition()
127 return new JSONObject(Map.of("label", label, "path", path)); in newPartition()
134 JSONObject config = new JSONObject(); in createPayloadMetadata()
136 new JSONObject(Map.of("name", "microdroid-apk", "path", "", "idsig_path", ""))); in createPayloadMetadata()
141 .map(apex -> new JSONObject(Map.of("name", apex.name, "path", ""))) in createPayloadMetadata()
322 JSONObject config = new JSONObject(FileUtil.readStringFromFile(microdroidConfigFile));
328 JSONObject disk = disks.getJSONObject(diskIndex);
331 JSONObject part = partitions.getJSONObject(partIndex);
363 disks.put(new JSONObject().put("writable", false).put("partitions", partitions));
/packages/apps/ThemePicker/tests/robotests/src/com/android/customization/model/color/
DColorCustomizationManagerTest.kt31 import org.json.JSONObject
78 val json = JSONObject(settings).toString() in testParseSettings()
108 val overlaysJson = JSONObject(manager.storedOverlays) in testApplyColorBundle()
142 val overlaysJson = JSONObject(manager.storedOverlays) in testApplyColorSeed()
172 val overlaysJson = JSONObject(manager.storedOverlays) in testApply_colorSeedFromWallpaperBoth_shouldReturnBothValue()
191 val overlaysJson = JSONObject(manager.storedOverlays) in testApply_colorSeedFromWallpaperDifferent_shouldReturnNonBothValue()
/packages/apps/ThemePicker/src/com/android/customization/model/color/
DColorOption.java34 import org.json.JSONObject;
151 public JSONObject getJsonPackages(boolean insertTimestamp) { in getJsonPackages()
152 JSONObject json; in getJsonPackages()
154 json = new JSONObject(); in getJsonPackages()
156 json = new JSONObject(mPackagesByCategory); in getJsonPackages()
170 private void removeNullValues(JSONObject json) { in removeNullValues()
DColorCustomizationManager.java48 import org.json.JSONObject;
138 JSONObject overlaysJson = null; in applyOverlays()
140 overlaysJson = new JSONObject(currentStoredOverlays); in applyOverlays()
141 JSONObject colorJson = colorOption.getJsonPackages(true); in applyOverlays()
247 final JSONObject jsonPackages = new JSONObject(serializedJsonSettings); in parseColorSettings()
/packages/apps/ThemePicker/tests/robotests/src/com/android/customization/model/clock/
DClockManagerTest.java33 import org.json.JSONObject;
80 JSONObject json = in testApply()
81 new JSONObject(Secure.getString(mContentResolver, ClockManager.CLOCK_FACE_SETTING)); in testApply()
101 JSONObject json = new JSONObject().put(CLOCK_FIELD, CLOCK_ID); in testGetCurrentClock_returnsClockId()
/packages/services/Car/service/src/com/android/car/storagemonitoring/
DWearHistory.java24 import org.json.JSONObject;
48 WearHistory(@NonNull JSONObject jsonObject) throws JSONException { in WearHistory()
51 JSONObject wearRecordJson = wearHistory.getJSONObject(i); in WearHistory()
64 JSONObject jsonObject = new JSONObject(new String(Files.readAllBytes(in.toPath()))); in fromJson()
/packages/apps/Dialer/java/com/android/incallui/calllocation/impl/
DReverseGeocodeTask.java28 import org.json.JSONObject;
67 JSONObject responseObject = new JSONObject(jsonResponse); in doInBackground()
71 JSONObject topResult = results.optJSONObject(0); in doInBackground()
80 JSONObject component = components.optJSONObject(i); in doInBackground()
/packages/modules/NetworkStack/apishim/30/com/android/networkstack/apishim/api30/
DCaptivePortalDataShimImpl.java34 import org.json.JSONObject;
60 public static CaptivePortalDataShim fromJson(JSONObject obj) throws JSONException, in fromJson()
90 private static long getLongOrDefault(JSONObject o, String key, long def) throws JSONException { in getLongOrDefault()
95 private static Uri getUriOrNull(JSONObject o, String key) throws JSONException { in getUriOrNull()
/packages/apps/ThemePicker/src/com/android/customization/model/theme/
DDefaultThemeProvider.java50 import org.json.JSONObject;
279 JSONObject jsonPackages = themeBundle.getJsonPackages(false); in addThemeBundleToArray()
312 JSONObject jsonTheme = customThemes.getJSONObject(i); in addCustomThemes()
350 JSONObject theme = new JSONObject(serializedTheme); in parseThemeBundle()
364 JSONObject theme = new JSONObject(serializedTheme); in parseCustomTheme()
375 private void convertJsonToBuilder(JSONObject theme, ThemeBundle.Builder builder) in convertJsonToBuilder()
/packages/apps/Settings/tests/robotests/src/com/android/settings/
DSettingsDumpServiceTest.java37 import org.json.JSONObject;
98 final JSONObject jsonObject = mTestService.dumpAnomalyDetection(); in testDumpAnomalyDetection_returnAnomalyInfo()
111 JSONObject object = (JSONObject) printWriter.getPrintObject(); in testDump_ReturnJsonObject()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/mapclient/obex/
DBmessage.java22 import org.json.JSONObject;
148 JSONObject json = new JSONObject(); in toString()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/storagemonitoring/
DCarStorageMonitoringTest.java48 import org.json.JSONObject;
233 JSONObject jsonObject = new JSONObject( in testWearEstimateRecordJson()
272 JSONObject jsonObject = new JSONObject( in testWearHistoryJson()
477 JSONObject jsonObject = new JSONObject( in testUidIoStatEntryJson()
691 JSONObject jsonObject = new JSONObject( in testUidIoStatsDeltaJson()
777 JSONObject jsonObject = new JSONObject( in testLifetimeWriteInfoJson()

123