Home
last modified time | relevance | path

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

123456

/tools/tradefederation/core/remote/src/com/android/tradefed/command/remote/
DGetLastCommandResultOp.java23 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 …]
DStartHandoverOp.java18 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()
DAllocateDeviceOp.java18 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()
DFreeDeviceOp.java18 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()
DCloseOp.java18 import org.json.JSONException;
19 import org.json.JSONObject;
37 static CloseOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument
DHandoverCompleteOp.java18 import org.json.JSONException;
19 import org.json.JSONObject;
35 static HandoverCompleteOp createFromJson(JSONObject json) throws JSONException { in createFromJson() argument
DAddCommandOp.java18 import org.json.JSONArray;
19 import org.json.JSONException;
20 import org.json.JSONObject;
DAddCommandFileOp.java18 import org.json.JSONArray;
19 import org.json.JSONException;
20 import org.json.JSONObject;
/tools/tradefederation/core/src/com/android/tradefed/util/hostmetric/
DHostMetric.java18 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/loganalysis/tests/src/com/android/loganalysis/parser/
DCompactMemInfoParserTest.java22 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/python-lib/tradefed_py/
Dtf_runner.py18 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/test/connectivity/tools/lab/reporters/
Djson_reporter.py17 import json
50 json.dump(
54 class AutoJsonEncoder(json.JSONEncoder):
63 return json.JSONEncoder.default(self, obj)
/tools/tradefederation/core/util-apps/WifiUtil/src/com/android/tradefed/utils/wifi/
DWifiConnector.java30 import org.json.JSONException;
31 import org.json.JSONObject;
338 final JSONObject json = new JSONObject(); in getWifiInfo() local
342 json.put("ssid", info.getSSID()); in getWifiInfo()
343 json.put("bssid", info.getBSSID()); in getWifiInfo()
344 json.put("hiddenSsid", info.getHiddenSSID()); in getWifiInfo()
351 json.put("ipAddress", String.format("%s.%s.%s.%s", a, b, c, d)); in getWifiInfo()
352 json.put("linkSpeed", info.getLinkSpeed()); in getWifiInfo()
353 json.put("rssi", info.getRssi()); in getWifiInfo()
354 json.put("macAddress", info.getMacAddress()); in getWifiInfo()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/item/
DInterruptItemTest.java23 import org.json.JSONArray;
24 import org.json.JSONException;
25 import org.json.JSONObject;
DBatteryUsageItemTest.java22 import org.json.JSONArray;
23 import org.json.JSONException;
24 import org.json.JSONObject;
DBatteryDischargeItemTest.java22 import org.json.JSONArray;
23 import org.json.JSONException;
24 import org.json.JSONObject;
DSmartMonkeyLogItemTest.java20 import org.json.JSONArray;
21 import org.json.JSONException;
22 import org.json.JSONObject;
DProcrankItemTest.java20 import org.json.JSONArray;
21 import org.json.JSONException;
22 import org.json.JSONObject;
DMonkeyLogItemTest.java20 import org.json.JSONArray;
21 import org.json.JSONException;
22 import org.json.JSONObject;
DTopItemTest.java20 import org.json.JSONException;
21 import org.json.JSONObject;
DWakelockItemTest.java22 import org.json.JSONArray;
23 import org.json.JSONException;
24 import org.json.JSONObject;
/tools/test/connectivity/acts/framework/acts/controllers/
Dnative.py18 import json
56 request = json.dumps(data)
63 result = json.loads(
/tools/tradefederation/core/src/com/android/tradefed/sandbox/
DSandboxInvocationRunner.java27 import org.json.JSONException;
28 import org.json.JSONObject;
69 JSONObject json = new JSONObject(line); in handleStderrException() local
70 String filePath = json.getString(TradefedSandboxRunner.EXCEPTION_KEY); in handleStderrException()
DTradefedSandboxRunner.java31 import org.json.JSONException;
32 import org.json.JSONObject;
73 JSONObject json = new JSONObject(); in printStackTrace() local
74 json.put(EXCEPTION_KEY, serializedException.getAbsolutePath()); in printStackTrace()
75 System.err.println(json.toString()); in printStackTrace()
/tools/test/connectivity/acts/tests/google/tel/etc/
Dmanage_sim.py24 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)

123456