Home
last modified time | relevance | path

Searched refs:json (Results 1 – 25 of 105) sorted by relevance

12345

/frameworks/base/tools/protologtool/tests/com/android/protolog/tool/
DViewerConfigParserTest.kt19 import com.android.json.stream.JsonReader
33 val json = """ in parseMessage() constant
40 val msg = parser.parseMessage(getJSONReader(json)) in parseMessage()
48 val json = """ in parseMessage_reorder() constant
55 val msg = parser.parseMessage(getJSONReader(json)) in parseMessage_reorder()
63 val json = """ in parseMessage_unknownEntry() constant
71 val msg = parser.parseMessage(getJSONReader(json)) in parseMessage_unknownEntry()
79 val json = """ in parseMessage_noMessage() constant
85 parser.parseMessage(getJSONReader(json)) in parseMessage_noMessage()
90 val json = """ in parseMessage_noLevel() constant
[all …]
DViewerConfigBuilderTest.kt19 import com.android.json.stream.JsonReader
43 private fun parseConfig(json: String): Map<Int, ViewerConfigParser.ConfigEntry> { in parseConfig()
44 return ViewerConfigParser().parseConfig(JsonReader(StringReader(json))) in parseConfig()
/frameworks/base/services/core/java/com/android/server/rollback/
DRollbackStore.java39 import org.json.JSONArray;
40 import org.json.JSONException;
41 import org.json.JSONObject;
170 private static @NonNull SparseLongArray ceSnapshotInodesFromJson(JSONArray json) in ceSnapshotInodesFromJson() argument
172 SparseLongArray ceSnapshotInodes = new SparseLongArray(json.length()); in ceSnapshotInodesFromJson()
173 for (int i = 0; i < json.length(); i++) { in ceSnapshotInodesFromJson()
174 JSONObject entry = json.getJSONObject(i); in ceSnapshotInodesFromJson()
192 private static @NonNull SparseIntArray extensionVersionsFromJson(JSONArray json) in extensionVersionsFromJson() argument
194 if (json == null) { in extensionVersionsFromJson()
197 SparseIntArray extensionVersions = new SparseIntArray(json.length()); in extensionVersionsFromJson()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/signedconfig/
DSignedConfigTest.java32 import org.json.JSONException;
33 import org.json.JSONObject;
69 JSONObject json = new JSONObject("{\"min_sdk\":2, \"max_sdk\": 3, \"values\": {}}"); in testParsePerSdkConfigSdkMinMax() local
70 SignedConfig.PerSdkConfig config = SignedConfig.parsePerSdkConfig(json, emptySet(), in testParsePerSdkConfigSdkMinMax()
78 JSONObject json = new JSONObject("{\"max_sdk\": 3, \"values\": {}}"); in testParsePerSdkConfigNoMinSdk() local
80 SignedConfig.parsePerSdkConfig(json, emptySet(), emptyMap()); in testParsePerSdkConfigNoMinSdk()
89 JSONObject json = new JSONObject("{\"min_sdk\": 1, \"values\": {}}"); in testParsePerSdkConfigNoMaxSdk() local
91 SignedConfig.parsePerSdkConfig(json, emptySet(), emptyMap()); in testParsePerSdkConfigNoMaxSdk()
100 JSONObject json = new JSONObject("{\"min_sdk\": 1, \"max_sdk\": 3}"); in testParsePerSdkConfigNoValues() local
102 SignedConfig.parsePerSdkConfig(json, emptySet(), emptyMap()); in testParsePerSdkConfigNoValues()
[all …]
/frameworks/base/services/core/java/com/android/server/storage/
DDiskStatsFileLogger.java27 import org.json.JSONArray;
28 import org.json.JSONException;
29 import org.json.JSONObject;
98 JSONObject json = new JSONObject(); in getJsonRepresentation() local
100 json.put(LAST_QUERY_TIMESTAMP_KEY, System.currentTimeMillis()); in getJsonRepresentation()
101 json.put(PHOTOS_KEY, mResult.imagesSize); in getJsonRepresentation()
102 json.put(VIDEOS_KEY, mResult.videosSize); in getJsonRepresentation()
103 json.put(AUDIO_KEY, mResult.audioSize); in getJsonRepresentation()
104 json.put(DOWNLOADS_KEY, mDownloadsSize); in getJsonRepresentation()
105 json.put(SYSTEM_KEY, mSystemSize); in getJsonRepresentation()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
DDiskStatsLoggingServiceTest.java52 import org.json.JSONObject;
103 JSONObject json = getJsonOutput(); in testEmptyLog() local
104 assertThat(json.getLong(DiskStatsFileLogger.PHOTOS_KEY)).isEqualTo(0L); in testEmptyLog()
105 assertThat(json.getLong(DiskStatsFileLogger.VIDEOS_KEY)).isEqualTo(0L); in testEmptyLog()
106 assertThat(json.getLong(DiskStatsFileLogger.AUDIO_KEY)).isEqualTo(0L); in testEmptyLog()
107 assertThat(json.getLong(DiskStatsFileLogger.DOWNLOADS_KEY)).isEqualTo(0L); in testEmptyLog()
108 assertThat(json.getLong(DiskStatsFileLogger.SYSTEM_KEY)).isEqualTo(0L); in testEmptyLog()
109 assertThat(json.getLong(DiskStatsFileLogger.MISC_KEY)).isEqualTo(0L); in testEmptyLog()
110 assertThat(json.getLong(DiskStatsFileLogger.APP_SIZE_AGG_KEY)).isEqualTo(0L); in testEmptyLog()
111 assertThat(json.getLong(DiskStatsFileLogger.APP_CACHE_AGG_KEY)).isEqualTo(0L); in testEmptyLog()
[all …]
/frameworks/base/services/core/java/com/android/server/
DDiskStatsService.java43 import org.json.JSONArray;
44 import org.json.JSONException;
45 import org.json.JSONObject;
212 JSONObject json = new JSONObject(jsonString); in reportCachedValues() local
214 pw.println(json.getLong(DiskStatsFileLogger.APP_SIZE_AGG_KEY)); in reportCachedValues()
216 pw.println(json.getLong(DiskStatsFileLogger.APP_DATA_SIZE_AGG_KEY)); in reportCachedValues()
218 pw.println(json.getLong(DiskStatsFileLogger.APP_CACHE_AGG_KEY)); in reportCachedValues()
220 pw.println(json.getLong(DiskStatsFileLogger.PHOTOS_KEY)); in reportCachedValues()
222 pw.println(json.getLong(DiskStatsFileLogger.VIDEOS_KEY)); in reportCachedValues()
224 pw.println(json.getLong(DiskStatsFileLogger.AUDIO_KEY)); in reportCachedValues()
[all …]
/frameworks/base/tools/bit/
Dmake.cpp91 Json::Value json; in BuildVars() local
93 if (!reader.parse(stream, json)) { in BuildVars()
97 if (!json.isObject()) { in BuildVars()
103 vector<string> names = json.getMemberNames(); in BuildVars()
107 const Json::Value& value = json[name]; in BuildVars()
137 Json::Value json(Json::objectValue); in save() local
140 json[it->first] = it->second; in save()
144 writer.write(stream, json); in save()
182 get_values(const Json::Value& json, const string& name, vector<string>* result) in get_values() argument
186 const Json::Value& value = json.get(name, nullValue); in get_values()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/clock/
DSettingsWrapperTest.kt23 import org.json.JSONObject
65 val json: JSONObject = JSONObject() in testDecodeJSON() constant
66 json.put(CLOCK_FIELD, PACKAGE) in testDecodeJSON()
67 json.put(TIMESTAMP_FIELD, System.currentTimeMillis()) in testDecodeJSON()
68 val value = json.toString() in testDecodeJSON()
78 val json: JSONObject = JSONObject() in testDecodeJSONWithoutClockField() constant
79 json.put(TIMESTAMP_FIELD, System.currentTimeMillis()) in testDecodeJSONWithoutClockField()
80 val value = json.toString() in testDecodeJSONWithoutClockField()
/frameworks/ml/nn/tools/systrace_parser/
Dparse_systrace.py24 def produce_stats(trace, print_detail=False, total_times=False, per_execution=False, json=False): argument
38 if json:
49 if json and printed_one:
52 print_stats(tracker_map, print_detail, total_times, per_execution, json,
63 if json and printed_one:
65 print_stats(tracker_map, print_detail, total_times, per_execution, json, starting_mark, sep)
66 if json:
78 produce_stats(trace, args.print_detail, args.total_times, args.per_execution, args.json)
/frameworks/base/services/core/java/com/android/server/signedconfig/
DSignedConfig.java21 import org.json.JSONArray;
22 import org.json.JSONException;
23 import org.json.JSONObject;
128 JSONObject json = new JSONObject(config); in parse() local
129 int version = json.getInt(KEY_VERSION); in parse()
131 JSONArray perSdkConfig = json.getJSONArray(KEY_CONFIG); in parse()
154 static PerSdkConfig parsePerSdkConfig(JSONObject json, Set<String> allowedKeys, in parsePerSdkConfig() argument
157 int minSdk = json.getInt(CONFIG_KEY_MIN_SDK); in parsePerSdkConfig()
158 int maxSdk = json.getInt(CONFIG_KEY_MAX_SDK); in parsePerSdkConfig()
159 JSONObject valuesJson = json.getJSONObject(CONFIG_KEY_VALUES); in parsePerSdkConfig()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/
DSettingsWrapper.java25 import org.json.JSONException;
26 import org.json.JSONObject;
83 JSONObject json; in decode() local
85 json = new JSONObject(value); in decode()
94 return json.getString(CLOCK_FIELD); in decode()
127 JSONObject json = new JSONObject(); in migrate() local
128 json.put(CLOCK_FIELD, value); in migrate()
130 json.toString(), in migrate()
/frameworks/base/services/core/
DAndroid.bp43 name: "generate-protolog.json",
55 out: ["services.core.protolog.json"],
59 name: "checked-protolog.json",
61 ":generate-protolog.json",
62 ":services.core.protolog.json",
64 cmd: "cp $(location :generate-protolog.json) $(out) && " +
65 "{ ! (diff $(out) $(location :services.core.protolog.json) | grep -q '^<') || " +
68 "# cp $(location :generate-protolog.json) " +
69 "$(location :services.core.protolog.json)\\n#\\n" +
71 out: ["services.core.protolog.json"],
[all …]
/frameworks/native/vulkan/vkjson/
Dvkjson_unittest.cc66 std::string json = VkJsonInstanceToJson(instance); in main() local
67 std::cout << json << std::endl; in main()
70 result = VkJsonInstanceFromJson(json, &instance2, &errors); in main()
85 json = VkJsonImageFormatPropertiesToJson(props); in main()
87 result = VkJsonImageFormatPropertiesFromJson(json, &props2, &errors); in main()
Dvkjson.h157 bool VkJsonInstanceFromJson(const std::string& json,
166 bool VkJsonDeviceFromJson(const std::string& json,
172 bool VkJsonImageFormatPropertiesFromJson(const std::string& json,
186 inline bool VkJsonAllPropertiesFromJson(const std::string& json, in VkJsonAllPropertiesFromJson() argument
189 return VkJsonDeviceFromJson(json, properties, errors); in VkJsonAllPropertiesFromJson()
/frameworks/base/services/core/java/com/android/server/protolog/
DProtoLogViewerConfigReader.java21 import org.json.JSONException;
22 import org.json.JSONObject;
67 JSONObject json = new JSONObject(builder.toString()); in loadViewerConfig() local
68 JSONObject messages = json.getJSONObject("messages"); in loadViewerConfig()
/frameworks/base/services/core/java/com/android/server/updates/
DCertificateTransparencyLogInstallReceiver.java29 import org.json.JSONArray;
30 import org.json.JSONException;
31 import org.json.JSONObject;
101 JSONObject json = new JSONObject(new String(content, StandardCharsets.UTF_8)); in install() local
102 JSONArray logs = json.getJSONArray("logs"); in install()
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
DJsonParser.java22 import org.json.JSONArray;
23 import org.json.JSONException;
24 import org.json.JSONObject;
DAssetMatcherFactory.java19 import org.json.JSONException;
20 import org.json.JSONObject;
DStatementParser.java21 import org.json.JSONArray;
22 import org.json.JSONException;
23 import org.json.JSONObject;
DAndroidAppAsset.java19 import org.json.JSONArray;
20 import org.json.JSONException;
21 import org.json.JSONObject;
/frameworks/ml/nn/tools/
Dparse_benchmark.py15 import json
84 print(json.dumps(stats))
97 print(json.dumps({"benchmark": name, "sample": sample}))
/frameworks/base/packages/DynamicSystemInstallationService/src/com/android/dynsystem/
DKeyRevocationList.java24 import org.json.JSONArray;
25 import org.json.JSONException;
26 import org.json.JSONObject;
/frameworks/ml/nn/tools/systrace_parser/parser/test/
Dlarge_test.sh25 ../../parse_systrace.py --per-execution --json omr1_incomplete.html > omr1_incomplete.tmp
38 diff omr1_incomplete.json omr1_incomplete.tmp
/frameworks/native/services/gpuservice/
DGpuService.cpp145 std::string json = VkJsonInstanceToJson(VkJsonGetInstance()); in vkjsonPrint() local
146 fwrite(json.data(), 1, json.size(), out); in vkjsonPrint()

12345