Home
last modified time | relevance | path

Searched refs:jsonWriter (Results 1 – 17 of 17) sorted by relevance

/packages/services/Car/obd2-lib/src/com/android/car/obd2/
DObd2LiveFrameGenerator.java71 public JsonWriter generate(JsonWriter jsonWriter) throws IOException { in generate() argument
72 return generate(jsonWriter, SystemClock.elapsedRealtimeNanos()); in generate()
75 public JsonWriter generate(JsonWriter jsonWriter, long timestamp) throws IOException { in generate() argument
76 jsonWriter.beginObject(); in generate()
77 jsonWriter.name("type").value(FRAME_TYPE_LIVE); in generate()
78 jsonWriter.name("timestamp").value(timestamp); in generate()
79 jsonWriter.name("intValues").beginArray(); in generate()
84 jsonWriter.beginObject(); in generate()
85 jsonWriter.name("id").value(command.getPid()); in generate()
86 jsonWriter.name("value").value(result.get()); in generate()
[all …]
DObd2FreezeFrameGenerator.java66 public JsonWriter generate(JsonWriter jsonWriter) throws IOException, InterruptedException { in generate() argument
67 return generate(jsonWriter, SystemClock.elapsedRealtimeNanos()); in generate()
119 public JsonWriter generate(JsonWriter jsonWriter, long timestamp) in generate() argument
125 jsonWriter.beginObject(); in generate()
126 jsonWriter.name("type").value(FRAME_TYPE_FREEZE); in generate()
127 jsonWriter.name("timestamp").value(timestamp); in generate()
128 jsonWriter.name("stringValue").value(freezeFrame.dtc); in generate()
129 jsonWriter.name("intValues").beginArray(); in generate()
136 jsonWriter.beginObject(); in generate()
137 jsonWriter.name("id").value(command.getPid()); in generate()
[all …]
/packages/services/Car/car-lib/src/android/car/storagemonitoring/
DIoStatsEntry.java124 public void writeToJson(JsonWriter jsonWriter) throws IOException { in writeToJson() argument
125 jsonWriter.beginObject(); in writeToJson()
126 jsonWriter.name("uid").value(uid); in writeToJson()
127 jsonWriter.name("runtimeMillis").value(runtimeMillis); in writeToJson()
128 jsonWriter.name("foreground"); foreground.writeToJson(jsonWriter); in writeToJson()
129 jsonWriter.name("background"); background.writeToJson(jsonWriter); in writeToJson()
130 jsonWriter.endObject(); in writeToJson()
277 public void writeToJson(JsonWriter jsonWriter) throws IOException { in writeToJson() argument
278 jsonWriter.beginObject(); in writeToJson()
279 jsonWriter.name("bytesRead").value(bytesRead); in writeToJson()
[all …]
DLifetimeWriteInfo.java87 public void writeToJson(JsonWriter jsonWriter) throws IOException { in writeToJson() argument
88 jsonWriter.beginObject(); in writeToJson()
89 jsonWriter.name("partition").value(partition); in writeToJson()
90 jsonWriter.name("fstype").value(fstype); in writeToJson()
91 jsonWriter.name("writtenBytes").value(writtenBytes); in writeToJson()
92 jsonWriter.endObject(); in writeToJson()
DIoStats.java87 public void writeToJson(JsonWriter jsonWriter) throws IOException { in writeToJson() argument
88 jsonWriter.beginObject(); in writeToJson()
89 jsonWriter.name("uptime").value(mUptimeTimestamp); in writeToJson()
90 jsonWriter.name("stats").beginArray(); in writeToJson()
92 stat.writeToJson(jsonWriter); in writeToJson()
94 jsonWriter.endArray(); in writeToJson()
95 jsonWriter.endObject(); in writeToJson()
DWearEstimate.java130 public void writeToJson(JsonWriter jsonWriter) throws IOException { in writeToJson() argument
131 jsonWriter.beginObject(); in writeToJson()
132 jsonWriter.name("wearEstimateTypeA").value(typeA); in writeToJson()
133 jsonWriter.name("wearEstimateTypeB").value(typeB); in writeToJson()
134 jsonWriter.endObject(); in writeToJson()
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DTelephonyBackupAgent.java447 try (JsonWriter jsonWriter = getJsonWriter(fileName)) { in backupAll() argument
449 messagesWritten = putSmsMessagesToJson(cursor, jsonWriter); in backupAll()
451 messagesWritten = putMmsMessagesToJson(cursor, jsonWriter); in backupAll()
459 JsonWriter jsonWriter) throws IOException { in putMmsMessagesToJson() argument
460 jsonWriter.beginArray(); in putMmsMessagesToJson()
464 msgCount += writeMmsToWriter(jsonWriter, cursor); in putMmsMessagesToJson()
466 jsonWriter.endArray(); in putMmsMessagesToJson()
471 int putSmsMessagesToJson(Cursor cursor, JsonWriter jsonWriter) throws IOException { in putSmsMessagesToJson() argument
473 jsonWriter.beginArray(); in putSmsMessagesToJson()
477 writeSmsToWriter(jsonWriter, cursor); in putSmsMessagesToJson()
[all …]
/packages/services/Car/car-lib/src/android/car/diagnostic/
DCarDiagnosticEvent.java126 public void writeToJson(JsonWriter jsonWriter) throws IOException { in writeToJson() argument
127 jsonWriter.beginObject(); in writeToJson()
129 jsonWriter.name("type"); in writeToJson()
132 jsonWriter.value("live"); in writeToJson()
135 jsonWriter.value("freeze"); in writeToJson()
141 jsonWriter.name("timestamp").value(timestamp); in writeToJson()
143 jsonWriter.name("intValues").beginArray(); in writeToJson()
145 jsonWriter.beginObject(); in writeToJson()
146 jsonWriter.name("id").value(intValues.keyAt(i)); in writeToJson()
147 jsonWriter.name("value").value(intValues.valueAt(i)); in writeToJson()
[all …]
/packages/services/Car/service/src/com/android/car/
DCarLocationService.java295 try (JsonWriter jsonWriter = new JsonWriter(new OutputStreamWriter(fos, "UTF-8"))) { in storeLocation() argument
296 jsonWriter.beginObject(); in storeLocation()
297 jsonWriter.name("provider").value(location.getProvider()); in storeLocation()
298 jsonWriter.name("latitude").value(location.getLatitude()); in storeLocation()
299 jsonWriter.name("longitude").value(location.getLongitude()); in storeLocation()
301 jsonWriter.name("altitude").value(location.getAltitude()); in storeLocation()
304 jsonWriter.name("speed").value(location.getSpeed()); in storeLocation()
307 jsonWriter.name("bearing").value(location.getBearing()); in storeLocation()
310 jsonWriter.name("accuracy").value(location.getAccuracy()); in storeLocation()
313 jsonWriter.name("verticalAccuracy").value( in storeLocation()
[all …]
DCarStorageMonitoringService.java192 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(mWearInfoFile))) { in storeWearHistory() argument
193 wearHistory.writeToJson(jsonWriter); in storeWearHistory()
451 JsonWriter jsonWriter = new JsonWriter(new FileWriter(mLifetimeWriteFile)); in logLifetimeWrites() local
452 jsonWriter.beginObject(); in logLifetimeWrites()
453 jsonWriter.name("lifetimeWriteInfo").beginArray(); in logLifetimeWrites()
456 writeInfo.writeToJson(jsonWriter); in logLifetimeWrites()
458 jsonWriter.endArray().endObject(); in logLifetimeWrites()
459 jsonWriter.close(); in logLifetimeWrites()
DCarUxRestrictionsManagerService.java471 try (JsonWriter jsonWriter = new JsonWriter( in persistConfig() argument
473 jsonWriter.beginArray(); in persistConfig()
475 config.writeJson(jsonWriter); in persistConfig()
477 jsonWriter.endArray(); in persistConfig()
/packages/services/Car/service/src/com/android/car/storagemonitoring/
DWearEstimateRecord.java60 void writeToJson(@NonNull JsonWriter jsonWriter) throws IOException { in writeToJson() argument
61 jsonWriter.beginObject(); in writeToJson()
62 jsonWriter.name("oldWearEstimate"); mOldWearEstimate.writeToJson(jsonWriter); in writeToJson()
63 jsonWriter.name("newWearEstimate"); mNewWearEstimate.writeToJson(jsonWriter); in writeToJson()
64 jsonWriter.name("totalCarServiceUptime").value(mTotalCarServiceUptime); in writeToJson()
65 jsonWriter.name("unixTimestamp").value(mUnixTimestamp.toEpochMilli()); in writeToJson()
66 jsonWriter.endObject(); in writeToJson()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/storagemonitoring/
DCarStorageMonitoringTest.java202 JsonWriter jsonWriter = new JsonWriter(stringWriter); in testWearEstimateJson() local
203 originalWearEstimate.writeToJson(jsonWriter); in testWearEstimateJson()
214 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(temporaryFile.getFile()))) { in testWearEstimateRecordJson() argument
215 originalWearEstimateRecord.writeToJson(jsonWriter); in testWearEstimateRecordJson()
250 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(temporaryFile.getFile()))) { in testWearHistoryJson() argument
251 originalWearHistory.writeToJson(jsonWriter); in testWearHistoryJson()
442 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(temporaryFile.getFile()))) { in testUidIoStatEntryJson() argument
443 statEntry.writeToJson(jsonWriter); in testUidIoStatEntryJson()
649 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(temporaryFile.getFile()))) { in testUidIoStatsDeltaJson() argument
650 statsDelta.writeToJson(jsonWriter); in testUidIoStatsDeltaJson()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarStorageMonitoringTest.java334 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(wearHistoryFile))) { in configureFakeSystemInterface() argument
335 wearHistory.writeToJson(jsonWriter); in configureFakeSystemInterface()
342 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(uptimeFile))) { in configureFakeSystemInterface() argument
343 jsonWriter.beginObject(); in configureFakeSystemInterface()
344 jsonWriter.name("uptime").value(wearData.uptime); in configureFakeSystemInterface()
345 jsonWriter.endObject(); in configureFakeSystemInterface()
352 try (JsonWriter jsonWriter = new JsonWriter(new FileWriter(previousLifetimeFile))) { in configureFakeSystemInterface() argument
353 jsonWriter.beginObject(); in configureFakeSystemInterface()
354 jsonWriter.name("lifetimeWriteInfo").beginArray(); in configureFakeSystemInterface()
356 writeInfo.writeToJson(jsonWriter); in configureFakeSystemInterface()
[all …]
DCarDiagnosticManagerTest.java542 JsonWriter jsonWriter = new JsonWriter(stringWriter); in testDiagnosticJson() local
544 liveFrame.writeToJson(jsonWriter); in testDiagnosticJson()
545 jsonWriter.flush(); in testDiagnosticJson()
/packages/services/Car/tests/obd2_test/src/com/android/car/obd2/test/
DObd2FreezeFrameGeneratorTest.java98 JsonWriter jsonWriter = new JsonWriter(stringWriter); in testObd2FreezeFrameGeneration() local
99 jsonWriter.beginArray(); in testObd2FreezeFrameGeneration()
100 obd2Generator.generate(jsonWriter); in testObd2FreezeFrameGeneration()
101 jsonWriter.endArray(); in testObd2FreezeFrameGeneration()
DObd2LiveFrameGeneratorTest.java79 JsonWriter jsonWriter = new JsonWriter(stringWriter); in testObd2LiveFrameGeneration() local
80 obd2Generator.generate(jsonWriter); in testObd2LiveFrameGeneration()