/packages/services/Car/tests/DiagnosticTools/src/com/google/android/car/diagnostictools/utils/ |
D | SensorMetadata.java | 23 import org.json.JSONException; 24 import org.json.JSONObject; 121 static SensorMetadata buildFromJson(JSONObject json) { in buildFromJson() argument 122 String name = readStringFromJSON(NAME_KEY, json); in buildFromJson() 123 String units = readStringFromJSON(UNITS_KEY, json); in buildFromJson() 125 if (json.has(CONVERSION_KEY)) { in buildFromJson() 127 JSONObject conversionObject = json.getJSONObject(CONVERSION_KEY); in buildFromJson() 135 } else if (json.has(MAPPING_KEY)) { in buildFromJson() 137 Map<Integer, String> mapping = readMappingFromJSON(MAPPING_KEY, json); in buildFromJson() 143 String translationString = readStringFromJSON(TRANSLATION_KEY, json); in buildFromJson() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/mapclient/obex/ |
D | Message.java | 19 import org.json.JSONException; 20 import org.json.JSONObject; 167 JSONObject json = new JSONObject(); in toString() local 170 json.put("handle", mHandle); in toString() 171 json.put("subject", mSubject); in toString() 172 json.put("datetime", mDateTime); in toString() 173 json.put("sender_name", mSenderName); in toString() 174 json.put("sender_addressing", mSenderAddressing); in toString() 175 json.put("replyto_addressing", mReplytoAddressing); in toString() 176 json.put("recipient_name", mRecipientName); in toString() [all …]
|
D | Bmessage.java | 21 import org.json.JSONException; 22 import org.json.JSONObject; 148 JSONObject json = new JSONObject(); in toString() local 151 json.put("status", mBmsgStatus); in toString() 152 json.put("type", mBmsgType); in toString() 153 json.put("folder", mBmsgFolder); in toString() 154 json.put("charset", mBbodyCharset); in toString() 155 json.put("message", mMessage); in toString() 160 return json.toString(); in toString()
|
D | EventReport.java | 21 import org.json.JSONException; 22 import org.json.JSONObject; 185 JSONObject json = new JSONObject(); in toString() local 188 json.put("type", mType); in toString() 189 json.put("handle", mHandle); in toString() 190 json.put("folder", mFolder); in toString() 191 json.put("old_folder", mOldFolder); in toString() 192 json.put("msg_type", mMsgType); in toString() 197 return json.toString(); in toString()
|
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/ |
D | jsoncheckertest.cpp | 44 char* json = (char*)malloc(length + 1); in ReadFile() local 45 size_t readLength = fread(json, 1, length, fp); in ReadFile() 46 json[readLength] = '\0'; in ReadFile() 48 return json; in ReadFile() 63 char* json = ReadFile(filename, length); in TEST() local 64 if (!json) { in TEST() 71 document.Parse((const char*)json); in TEST() 74 document.Parse<kParseIterativeFlag>((const char*)json); in TEST() 77 free(json); in TEST() 84 char* json = ReadFile(filename, length); in TEST() local [all …]
|
D | namespacetest.cpp | 19 #define RAPIDJSON_NAMESPACE my::rapid::json 20 #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapid { namespace json { 32 static const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\"… variable 39 doc.Parse(json); in TEST() 50 StringStream s(json); in TEST() 57 EXPECT_STREQ(json, buffer.GetString()); in TEST() 58 EXPECT_EQ(sizeof(json)-1, buffer.GetSize()); in TEST() 68 EXPECT_STREQ(json, buffer.GetString()); in TEST()
|
D | prettywritertest.cpp | 154 char* json = (char*)malloc(size + 1); in TEST() local 155 size_t readLength = fread(json, 1, size, fp); in TEST() 156 json[readLength] = '\0'; in TEST() 159 EXPECT_STREQ(kPrettyJson, json); in TEST() 160 free(json); in TEST()
|
D | writertest.cpp | 37 #define TEST_ROUNDTRIP(json) \ argument 39 StringStream s(json); \ 44 EXPECT_STREQ(json, buffer.GetString()); \ 111 …const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.141… in TEST() local 115 StringStream s(json); in TEST() 120 EXPECT_STREQ(json, buffer.GetString()); in TEST() 125 StringStream s(json); in TEST() 137 EXPECT_STREQ(json, buffer2.GetString()); in TEST()
|
D | readertest.cpp | 714 char *json = StrDup("[ ] "); in TEST() local 715 InsituStringStream s(json); in TEST() 720 free(json); in TEST() 724 char *json = StrDup("[1, 2, 3, 4]"); in TEST() local 725 InsituStringStream s(json); in TEST() 730 free(json); in TEST() 798 …const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123,… in TEST() local 802 char* json2 = StrDup(json); in TEST() 813 StringStream s(json); in TEST() 1009 …const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123,… in TEST() local [all …]
|
/packages/modules/Connectivity/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/data/ |
D | FastPairTestDataManager.kt | 42 fun sendAntispoofKeyDeviceMetadata(modelId: String, json: String) { in <lambda>() 46 intent.putExtra(DATA_JSON_STRING_KEY, json) in <lambda>() 49 testDataCache.putAntispoofKeyDeviceMetadata(modelId, json) in <lambda>() 56 fun sendAccountKeyDeviceMetadataJsonArray(json: String) { in <lambda>() 59 intent.putExtra(DATA_JSON_STRING_KEY, json) in <lambda>() 62 testDataCache.putAccountKeyDeviceMetadataJsonArray(json) in <lambda>() 83 val json = intent.getStringExtra(DATA_JSON_STRING_KEY)!! in <lambda>() constant 84 testDataCache.putAccountKeyDeviceMetadataJsonObject(json) in <lambda>() 85 listener?.onManageFastPairAccountDevice(json) in <lambda>() 108 fun onManageFastPairAccountDevice(json: String) in <lambda>()
|
/packages/apps/ThemePicker/src/com/android/customization/model/color/ |
D | ColorOption.java | 33 import org.json.JSONException; 34 import org.json.JSONObject; 152 JSONObject json; in getJsonPackages() local 154 json = new JSONObject(); in getJsonPackages() 156 json = new JSONObject(mPackagesByCategory); in getJsonPackages() 158 removeNullValues(json); in getJsonPackages() 162 json.put(TIMESTAMP_FIELD, System.currentTimeMillis()); in getJsonPackages() 167 return json; in getJsonPackages() 170 private void removeNullValues(JSONObject json) { in removeNullValues() argument 171 Iterator<String> keys = json.keys(); in removeNullValues() [all …]
|
/packages/apps/ThemePicker/src/com/android/customization/model/clock/ |
D | ClockManager.java | 24 import org.json.JSONException; 25 import org.json.JSONObject; 50 final JSONObject json = new JSONObject(); in handleApply() local 51 json.put(CLOCK_FIELD, option.getId()); in handleApply() 52 json.put(TIMESTAMP_FIELD, System.currentTimeMillis()); in handleApply() 53 stored = Secure.putString(mContentResolver, CLOCK_FACE_SETTING, json.toString()); in handleApply() 72 final JSONObject json = new JSONObject(value); in lookUpCurrentClock() local 73 return json.getString(CLOCK_FIELD); in lookUpCurrentClock()
|
/packages/modules/NeuralNetworks/tools/systrace_parser/ |
D | parse_systrace.py | 24 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)
|
/packages/modules/Connectivity/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/src/android/nearby/fastpair/seeker/data/ |
D | FastPairTestDataManager.kt | 46 val json = in <lambda>() constant 50 intent.putExtra(DATA_JSON_STRING_KEY, json) in <lambda>() 53 return json in <lambda>() 69 val json = intent.getStringExtra(DATA_JSON_STRING_KEY)!! in <lambda>() constant 70 testDataCache.putAntispoofKeyDeviceMetadata(modelId, json) in <lambda>() 74 val json = intent.getStringExtra(DATA_JSON_STRING_KEY)!! in <lambda>() constant 75 testDataCache.putAccountKeyDeviceMetadataJsonArray(json) in <lambda>()
|
/packages/services/Car/tools/emulator/ |
D | obd2_to_diagjson.py | 26 import json 32 return Json(json.load(file)) 88 return json.dumps(self.store) 147 def fromJson(cls, json): argument 149 event.setTimestamp(json.timestamp) 150 event.setType(json.type) 151 for intValue in json.intValues: 153 for floatValue in json.floatValues: 155 event.setStringValue(json.stringValue) 178 class EventEncoder(json.JSONEncoder): [all …]
|
/packages/apps/Car/DebuggingRestrictionController/server/ |
D | HOW_TO.md | 11 +- firebase.json # Describes properties of the project 16 + package.json # npm package file 20 +- api_config.SAMPLE.json # A sample configuration 22 +- .eslintrc.json # Rules for JavaScript linting 24 +- package.json # npm package file 29 # package.json) are installed 41 * Configure the token issuer in a config file. See `api_config.SAMPLE.json` 45 api_config="$(cat YOUR_CONFIG.json)"`.
|
/packages/services/Car/service/src/com/android/car/storagemonitoring/ |
D | WearEstimateRecord.java | 24 import org.json.JSONException; 25 import org.json.JSONObject; 55 WearEstimateRecord(@NonNull JSONObject json) throws JSONException { in WearEstimateRecord() argument 56 mOldWearEstimate = new WearEstimate(json.getJSONObject("oldWearEstimate")); in WearEstimateRecord() 57 mNewWearEstimate = new WearEstimate(json.getJSONObject("newWearEstimate")); in WearEstimateRecord() 58 mTotalCarServiceUptime = json.getLong("totalCarServiceUptime"); in WearEstimateRecord() 59 long unixEpochSeconds = Instant.ofEpochMilli(json.getLong("unixTimestamp")) in WearEstimateRecord()
|
/packages/apps/Test/connectivity/sl4n/rapidjson/example/tutorial/ |
D | tutorial.cpp | 15 …const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":12… in main() local 16 printf("Original JSON:\n %s\n", json); in main() 22 if (document.Parse(json).HasParseError()) in main() 26 char buffer[sizeof(json)]; in main() 27 memcpy(buffer, json, sizeof(json)); in main()
|
/packages/apps/ThemePicker/tests/robotests/src/com/android/customization/model/clock/ |
D | ClockManagerTest.java | 32 import org.json.JSONException; 33 import org.json.JSONObject; 80 JSONObject json = in testApply() local 82 assertEquals(CLOCK_ID, json.getString(CLOCK_FIELD)); in testApply() 101 JSONObject json = new JSONObject().put(CLOCK_FIELD, CLOCK_ID); in testGetCurrentClock_returnsClockId() local 102 Secure.putString(mContentResolver, ClockManager.CLOCK_FACE_SETTING, json.toString()); in testGetCurrentClock_returnsClockId()
|
/packages/apps/ThemePicker/src/com/android/customization/model/theme/ |
D | ThemeBundle.java | 55 import org.json.JSONException; 56 import org.json.JSONObject; 193 JSONObject json = new JSONObject(mPackagesByCategory); in getJsonPackages() local 195 removeNullValues(json); in getJsonPackages() 198 json.put(TIMESTAMP_FIELD, System.currentTimeMillis()); in getJsonPackages() 203 return json; in getJsonPackages() 206 private void removeNullValues(JSONObject json) { in removeNullValues() argument 207 Iterator<String> keys = json.keys(); in removeNullValues() 211 if (json.isNull(key)) { in removeNullValues() 216 json.remove(key); in removeNullValues()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | JsonBackedSuggestionExtras.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 36 public JsonBackedSuggestionExtras(String json) throws JSONException { in JsonBackedSuggestionExtras() argument 37 mExtras = new JSONObject(json); in JsonBackedSuggestionExtras()
|
/packages/modules/vndk/apex/ |
D | Android.bp | 21 manifest: "apex_manifest.current.json", 48 manifest: "apex_manifest.v32.json", 70 manifest: "apex_manifest.v31.json", 92 manifest: "apex_manifest.v30.json", 114 manifest: "apex_manifest.v29.json", 136 manifest: "apex_manifest.v28.json",
|
/packages/modules/Connectivity/nearby/tests/multidevices/host/test_helper/ |
D | utils.py | 15 import json 30 return json.loads( 42 return json.dumps(json_data, separators=(',', ':'))
|
/packages/modules/Connectivity/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/shared/android/nearby/fastpair/seeker/ |
D | FastPairTestDataCache.kt | 34 fun putAccountKeyDeviceMetadataJsonArray(json: String) { in putAccountKeyDeviceMetadataJsonArray() 36 gson.fromJson(json, Array<FastPairAccountKeyDeviceMetadataData>::class.java) in putAccountKeyDeviceMetadataJsonArray() 40 fun putAccountKeyDeviceMetadataJsonObject(json: String) { in putAccountKeyDeviceMetadataJsonObject() 42 gson.fromJson(json, FastPairAccountKeyDeviceMetadataData::class.java) in putAccountKeyDeviceMetadataJsonObject() 59 fun putAntispoofKeyDeviceMetadata(modelId: String, json: String) { in putAntispoofKeyDeviceMetadata() 61 gson.fromJson(json, FastPairAntispoofKeyDeviceMetadataData::class.java) in putAntispoofKeyDeviceMetadata()
|
/packages/modules/Connectivity/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/ |
D | FastPairSeekerSnippet.kt | 111 fun putAntispoofKeyDeviceMetadata(modelId: String, json: String) { in putAntispoofKeyDeviceMetadata() 113 fastPairTestDataManager.sendAntispoofKeyDeviceMetadata(modelId, json) in putAntispoofKeyDeviceMetadata() 121 fun putAccountKeyDeviceMetadata(json: String) { in putAccountKeyDeviceMetadata() 123 fastPairTestDataManager.sendAccountKeyDeviceMetadataJsonArray(json) in putAccountKeyDeviceMetadata()
|