Home
last modified time | relevance | path

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

123

/frameworks/base/services/tests/servicestests/src/com/android/server/signedconfig/
DSignedConfigTest.java33 import org.json.JSONObject;
69 JSONObject json = new JSONObject("{\"min_sdk\":2, \"max_sdk\": 3, \"values\": {}}"); in testParsePerSdkConfigSdkMinMax()
78 JSONObject json = new JSONObject("{\"max_sdk\": 3, \"values\": {}}"); in testParsePerSdkConfigNoMinSdk()
89 JSONObject json = new JSONObject("{\"min_sdk\": 1, \"values\": {}}"); in testParsePerSdkConfigNoMaxSdk()
100 JSONObject json = new JSONObject("{\"min_sdk\": 1, \"max_sdk\": 3}"); in testParsePerSdkConfigNoValues()
111 JSONObject json = new JSONObject("{\"min_sdk\":null, \"max_sdk\": 3, \"values\": {}}"); in testParsePerSdkConfigSdkNullMinSdk()
122 JSONObject json = new JSONObject("{\"min_sdk\":1, \"max_sdk\": null, \"values\": {}}"); in testParsePerSdkConfigSdkNullMaxSdk()
133 JSONObject json = new JSONObject("{\"min_sdk\": 1, \"max_sdk\": 3, \"values\": null}"); in testParsePerSdkConfigNullValues()
145 JSONObject json = new JSONObject("{\"min_sdk\": 1, \"max_sdk\": 3, \"values\": {}}"); in testParsePerSdkConfigZeroValues()
154 JSONObject json = new JSONObject( in testParsePerSdkConfigSingleKey()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/flags/
DFlagSerializer.kt21 import org.json.JSONObject
33 private val setter: (JSONObject, String, T) -> Unit,
34 private val getter: (JSONObject, String) -> T
38 JSONObject() in toSettingsData()
56 val json = JSONObject(data) in fromSettingsData()
71 JSONObject::put,
72 JSONObject::getBoolean
77 JSONObject::put,
78 JSONObject::getString
83 JSONObject::put,
[all …]
/frameworks/base/services/core/java/com/android/server/biometrics/
DAuthenticationStatsPersister.java28 import org.json.JSONObject;
74 JSONObject frrStatsJson = new JSONObject(frrStats); in getAllFrrStats()
111 JSONObject frrStatJson = new JSONObject(frrStats); in removeFrrStats()
133 JSONObject frrStatJson = null; in persistFrrStats()
136 frrStatJson = new JSONObject(frrStats); in persistFrrStats()
147 frrStatJson = new JSONObject().put(USER_ID, userId); in persistFrrStats()
173 private String buildFrrStats(JSONObject frrStats, int totalAttempts, int rejectedAttempts, in buildFrrStats()
192 private String getValue(JSONObject jsonObject, String key) throws JSONException { in getValue()
196 private int getIntValue(JSONObject jsonObject, String key) throws JSONException { in getIntValue()
200 private int getIntValue(JSONObject jsonObject, String key, int defaultValue) in getIntValue()
/frameworks/base/services/core/java/com/android/server/rollback/
DRollbackStore.java42 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()
189 private static JSONObject rollbackInfoToJson(RollbackInfo rollback) throws JSONException { in rollbackInfoToJson()
190 JSONObject json = new JSONObject(); in rollbackInfoToJson()
202 private static RollbackInfo rollbackInfoFromJson(JSONObject json) throws JSONException { in rollbackInfoFromJson()
324 JSONObject dataJson = new JSONObject(); in saveRollback()
381 JSONObject dataJson = new JSONObject( in loadRollback()
[all …]
/frameworks/base/core/java/com/android/server/backup/
DAccountSyncSettingsBackupHelper.java35 import org.json.JSONObject;
102 JSONObject dataJSON = serializeAccountSyncSettingsToJSON(mUserId); in performBackup()
131 private JSONObject serializeAccountSyncSettingsToJSON(int userId) throws JSONException { in serializeAccountSyncSettingsToJSON()
151 JSONObject backupJSON = new JSONObject(); in serializeAccountSyncSettingsToJSON()
166 JSONObject accountJSON = new JSONObject(); in serializeAccountSyncSettingsToJSON()
177 JSONObject authorityJSON = new JSONObject(); in serializeAccountSyncSettingsToJSON()
259 JSONObject dataJSON = new JSONObject(dataString); in restoreEntity()
287 JSONObject accountJSON = (JSONObject) accountJSONArray.get(i); in restoreFromJsonArray()
404 private void restoreExistingAccountSyncSettingsFromJSON(JSONObject accountJSON, int userId) in restoreExistingAccountSyncSettingsFromJSON()
413 JSONObject authority = (JSONObject) authorities.get(i); in restoreExistingAccountSyncSettingsFromJSON()
/frameworks/base/services/core/java/com/android/server/signedconfig/
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()
/frameworks/base/core/java/com/android/internal/protolog/
DLegacyProtoLogViewerConfigReader.java22 import org.json.JSONObject;
89 JSONObject json = new JSONObject(builder.toString()); in loadViewerConfig()
90 JSONObject messages = json.getJSONObject("messages"); in loadViewerConfig()
98 JSONObject val = messages.getJSONObject(key); in loadViewerConfig()
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
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()
DAssetMatcherFactory.java22 import org.json.JSONObject;
34 JSONObject queryObject = new JSONObject(query); in create()
DAssetFactory.java21 import org.json.JSONObject;
37 public static AbstractAsset create(JSONObject asset) in create()
DWebAsset.java21 import org.json.JSONObject;
122 protected static WebAsset create(JSONObject asset) in create()
/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/http/
DHttpRequest.java31 import org.json.JSONObject;
45 public abstract JSONObject postData(); in postData()
73 public abstract Builder setPostData(JSONObject postData); in setPostData()
115 .setPostData(new JSONObject()) in builder()
/frameworks/libs/systemui/toruslib/torus-wallpaper-settings/src/main/java/com/google/android/torus/settings/storage/
DCustomizedSharedPreferences.kt26 import org.json.JSONObject
47 private fun jsonToBundle(json: JSONObject): Bundle { in jsonToBundle()
82 private fun bundleToJson(bundle: Bundle): JSONObject { in bundleToJson()
83 val jsonObj = JSONObject() in bundleToJson()
123 lateinit var jsonObj: JSONObject in save()
140 val json = JSONObject(jsonStr) in load()
/frameworks/base/services/core/java/com/android/server/storage/
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()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/external/
DCustomTileStatePersister.kt27 import org.json.JSONObject
105 val json = JSONObject(stateString) in readTileFromString()
117 private fun JSONObject.getStringOrNull(name: String): String? { in JSONObject() method
125 JSONObject() in writeToString()
/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
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()
DDiskStatsLoggingServiceTest.java52 import org.json.JSONObject;
103 JSONObject json = getJsonOutput(); in testEmptyLog()
145 JSONObject json = getJsonOutput(); in testPopulatedLogTask()
226 private JSONObject getJsonOutput() throws Exception { in getJsonOutput()
227 return new JSONObject(IoUtils.readFileAsString(mInputFile.getAbsolutePath())); in getJsonOutput()
/frameworks/base/packages/DynamicSystemInstallationService/src/com/android/dynsystem/
DKeyRevocationList.java26 import org.json.JSONObject;
101 JSONObject jsonObject = new JSONObject(jsonString); in fromJsonString()
107 JSONObject entry = entries.getJSONObject(i); in fromJsonString()
/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/
DClockProviderPlugin.kt28 import org.json.JSONObject
316 var metadata: JSONObject = JSONObject()
328 return JSONObject() in serialize()
340 val json = JSONObject(jsonStr) in deserialize()
/frameworks/base/services/core/java/com/android/server/updates/
DCertificateTransparencyLogInstallReceiver.java31 import org.json.JSONObject;
101 JSONObject json = new JSONObject(new String(content, StandardCharsets.UTF_8)); in install()
104 JSONObject log = logs.getJSONObject(i); in install()
134 private void installLog(File directory, JSONObject logObject) throws IOException { in installLog()
/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/eapaka/
DEapAkaApi.java49 import org.json.JSONObject;
164 JSONObject postData = null; in queryEntitlementStatus()
166 postData = new JSONObject(); in queryEntitlementStatus()
353 JSONObject postData = new JSONObject(); in challengeResponse()
385 JSONObject postData = null; in performEsimOdsaOperation()
387 postData = new JSONObject(); in performEsimOdsaOperation()
469 JSONObject postData = null; in acquireOidcAuthenticationEndpoint()
471 postData = new JSONObject(); in acquireOidcAuthenticationEndpoint()
544 JSONObject postData, ServiceEntitlementRequest request) in appendParametersForAuthentication()
615 JSONObject postData, ImmutableList<String> appIds, ServiceEntitlementRequest request) in appendParametersForServiceEntitlementRequest()
[all …]
/frameworks/base/cmds/uinput/src/com/android/commands/uinput/
DDevice.java31 import org.json.JSONObject;
291 final JSONObject json = new JSONObject(); in handleSyncEvent()
328 final JSONObject json = new JSONObject(); in onDeviceVibrating()
347 private void writeOutputObject(JSONObject json) { in writeOutputObject()
/frameworks/base/services/core/java/com/android/server/pm/
DShortcutPackageItem.java32 import org.json.JSONObject;
195 public JSONObject dumpCheckin(boolean clear) throws JSONException { in dumpCheckin()
196 final JSONObject result = new JSONObject(); in dumpCheckin()
/frameworks/base/core/java/android/app/
DNotificationChannelGroup.java33 import org.json.JSONObject;
282 public JSONObject toJson() throws JSONException { in toJson()
283 JSONObject record = new JSONObject(); in toJson()
/frameworks/base/services/core/java/com/android/server/
DDiskStatsService.java45 import org.json.JSONObject;
210 JSONObject json = new JSONObject(jsonString); in reportCachedValues()
245 JSONObject json = new JSONObject(jsonString); in reportCachedValuesProto()

123