/tools/tradefederation/core/remote/src/com/android/tradefed/command/remote/ |
D | GetLastCommandResultOp.java | 23 import org.json.JSONArray; 24 import org.json.JSONException; 25 import org.json.JSONObject; 56 static GetLastCommandResultOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument 57 return new GetLastCommandResultOp(json.getString(SERIAL)); in createFromJson() 72 protected void packIntoJson(JSONObject json) throws JSONException { in packIntoJson() argument 73 json.put(SERIAL, mSerial); in packIntoJson() 80 protected CommandResult unpackResponseFromJson(JSONObject json) throws JSONException { in unpackResponseFromJson() argument 83 String statusString = json.getString(STATUS); in unpackResponseFromJson() 90 String errorDetails = json.optString(INVOCATION_ERROR, null); in unpackResponseFromJson() [all …]
|
D | ExecCommandOp.java | 18 import org.json.JSONArray; 19 import org.json.JSONException; 20 import org.json.JSONObject; 45 static ExecCommandOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument 46 String serial = json.getString(SERIAL); in createFromJson() 47 JSONArray jsonArgs = json.getJSONArray(COMMAND_ARGS); in createFromJson()
|
D | StartHandoverOp.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 40 static StartHandoverOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument 41 return new StartHandoverOp(json.getInt(PORT)); in createFromJson()
|
D | AllocateDeviceOp.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 42 static AllocateDeviceOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument 43 return new AllocateDeviceOp(json.getString(SERIAL)); in createFromJson()
|
D | FreeDeviceOp.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 43 static FreeDeviceOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument 44 return new FreeDeviceOp(json.getString(SERIAL)); in createFromJson()
|
D | ListDevicesOp.java | 21 import org.json.JSONArray; 22 import org.json.JSONException; 23 import org.json.JSONObject; 53 static ListDevicesOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument
|
D | HandoverCompleteOp.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 35 static HandoverCompleteOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument
|
D | CloseOp.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 37 static CloseOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument
|
D | HandoverInitCompleteOp.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 35 static HandoverInitCompleteOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument
|
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/ |
D | wifi_datastore_utils.py | 17 import json 60 data=json.dumps({"hostname":name, 63 if response.json()['result'] == 'success': 80 data=json.dumps({"hostname":name})) 100 data=json.dumps({"hostname":name, "locked_by":admin})) 101 if response.json()['result']: 118 data=json.dumps({"hostname":name})) 119 if response.json()['result']: 137 return response.json() 150 return response.json()
|
/tools/tradefederation/core/python-lib/tradefed_py/ |
D | tf_runner.py | 18 import json 51 self.stream.write('TEST_RUN_STARTED %s\n' % json.dumps(resp)) 61 self.stream.write('TEST_STARTED %s\n' % json.dumps(resp)) 71 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp)) 82 self.stream.write('TEST_FAILED %s\n' % json.dumps(resp)) 84 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp)) 95 self.stream.write('TEST_IGNORED %s\n' % json.dumps(resp)) 97 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp)) 108 self.stream.write('TEST_ASSUMPTION_FAILURE %s\n' % json.dumps(resp)) 110 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp)) [all …]
|
/tools/loganalysis/tests/src/com/android/loganalysis/parser/ |
D | CompactMemInfoParserTest.java | 22 import org.json.JSONArray; 23 import org.json.JSONException; 24 import org.json.JSONObject; 193 JSONObject json = item.toJson(); in testJson() local 194 assertNotNull(json); in testJson() 196 JSONArray processes = json.getJSONArray("processes"); in testJson() 199 assertEquals(1005, (long)json.get("lostRam")); in testJson() 200 assertEquals(1221694, (long) json.get("freeRam")); in testJson() 201 assertEquals(5800, (long) json.get("totalZram")); in testJson() 202 assertEquals(491632, (long) json.get("freeSwapZram")); in testJson() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/util/hostmetric/ |
D | HostMetric.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 53 final JSONObject json = new JSONObject(); in toJson() local 54 json.put("name", mName); in toJson() 55 json.put("timestamp", mTimestamp); in toJson() 56 json.put("value", mValue); in toJson() 57 json.put("fields", new JSONObject(mData)); in toJson() 58 return json; in toJson()
|
/tools/tradefederation/core/util-apps/WifiUtil/src/com/android/tradefed/utils/wifi/ |
D | WifiConnector.java | 28 import org.json.JSONException; 29 import org.json.JSONObject; 341 final JSONObject json = new JSONObject(); in getWifiInfo() local 345 json.put("ssid", info.getSSID()); in getWifiInfo() 346 json.put("bssid", info.getBSSID()); in getWifiInfo() 347 json.put("hiddenSsid", info.getHiddenSSID()); in getWifiInfo() 354 json.put("ipAddress", String.format("%s.%s.%s.%s", a, b, c, d)); in getWifiInfo() 355 json.put("linkSpeed", info.getLinkSpeed()); in getWifiInfo() 356 json.put("rssi", info.getRssi()); in getWifiInfo() 357 json.put("macAddress", info.getMacAddress()); in getWifiInfo() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | SubprocessEventHelper.java | 24 import org.json.JSONException; 25 import org.json.JSONObject; 268 JSONObject json = new JSONObject(); in getNewJson() local 270 json.put(START_TIME, mStartTime); in getNewJson() 274 return json; in getNewJson() 354 JSONObject json; in getNewJson() local 356 json = new JSONObject(mRunMetrics); in getNewJson() 358 json = new JSONObject(); in getNewJson() 361 json.put(END_TIME, mEndTime); in getNewJson() 365 return json; in getNewJson()
|
/tools/test/connectivity/tools/lab/reporters/ |
D | json_reporter.py | 17 import json 50 json.dump( 54 class AutoJsonEncoder(json.JSONEncoder): 63 return json.JSONEncoder.default(self, obj)
|
/tools/test/connectivity/acts/framework/tests/libs/metrics/ |
D | json_metric_test.py | 16 import json 30 self.json = mock_json 37 return self.json 55 mock_open().write.assert_called_with(json.dumps(mock_json, indent=2))
|
/tools/tradefederation/core/atest/test_runners/ |
D | robolectric_test_runner_unittest.py | 18 import json 67 json_event_data = json.dumps(event_data) 95 json.loads(event1 + event2))] 106 data = '%s %s\n\n'%(event_name, json.dumps(event_data)) 140 data_data += '%s %s\n\n'%(event[0], json.dumps(event[1]))
|
/tools/test/connectivity/acts/tests/google/tel/etc/ |
D | manage_sim.py | 24 import json 97 simconf = json.load(f) 127 json.dump(simconf, f, indent=4, sort_keys=True) 135 simconf = json.load(f) 161 json.dump(simconf, f, indent=4, sort_keys=True)
|
/tools/tradefederation/core/src/com/android/tradefed/sandbox/ |
D | TradefedSandboxRunner.java | 33 import org.json.JSONException; 34 import org.json.JSONObject; 76 JSONObject json = new JSONObject(); in printStackTrace() local 77 json.put(EXCEPTION_KEY, serializedException.getAbsolutePath()); in printStackTrace() 78 System.err.println(json.toString()); in printStackTrace()
|
D | SandboxInvocationRunner.java | 28 import org.json.JSONException; 29 import org.json.JSONObject; 75 JSONObject json = new JSONObject(line); in handleStderrException() local 76 String filePath = json.getString(TradefedSandboxRunner.EXCEPTION_KEY); in handleStderrException()
|
/tools/test/connectivity/acts/framework/acts/controllers/ |
D | fuchsia_device.py | 19 import json 200 init_data = json.dumps({ 217 data = json.dumps({ 224 r = requests.get(url=self.print_address, data=data).json() 236 data = json.dumps({ 243 r = requests.get(url=self.cleanup_address, data=data).json()
|
/tools/loganalysis/src/com/android/loganalysis/ |
D | LogAnalyzer.java | 37 import org.json.JSONArray; 38 import org.json.JSONException; 39 import org.json.JSONObject; 291 private void printJson(JSONObject json) { in printJson() argument 292 if (json != null) { in printJson() 293 System.out.println(json.toString()); in printJson()
|
/tools/test/connectivity/acts/framework/acts/ |
D | records.py | 22 import json 154 return json.dumps(self.to_dict()) 206 json.dumps(info) 216 json.dumps(info) 245 json_str = json.dumps(d, indent=4)
|
/tools/external_updater/ |
D | notifier.py | 26 import json 126 results = json.load(f) 130 history = json.load(f) 137 json.dump(history, f, sort_keys=True, indent=4)
|