Home
last modified time | relevance | path

Searched refs:jsonReader (Results 1 – 9 of 9) sorted by relevance

/packages/services/Car/vehicle-hal-support-lib/src/com/android/car/vehiclehal/
DDiagnosticJson.java90 private void readIntValues(JsonReader jsonReader) throws IOException { in readIntValues() argument
91 while (jsonReader.hasNext()) { in readIntValues()
94 jsonReader.beginObject(); in readIntValues()
95 while (jsonReader.hasNext()) { in readIntValues()
96 String name = jsonReader.nextName(); in readIntValues()
97 if (name.equals("id")) id = jsonReader.nextInt(); in readIntValues()
98 else if (name.equals("value")) value = jsonReader.nextInt(); in readIntValues()
100 jsonReader.endObject(); in readIntValues()
105 private void readFloatValues(JsonReader jsonReader) throws IOException { in readFloatValues() argument
106 while (jsonReader.hasNext()) { in readFloatValues()
[all …]
DDiagnosticJsonReader.java52 public VehiclePropValue build(JsonReader jsonReader) throws IOException { in build() argument
53 DiagnosticJson diagnosticJson = DiagnosticJson.build(jsonReader); in build()
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DTelephonyBackupAgent.java663 try (JsonReader jsonReader = getJsonReader(fd)) {
666 putSmsMessagesToProvider(jsonReader);
669 putMmsMessagesToProvider(jsonReader);
677 void putSmsMessagesToProvider(JsonReader jsonReader) throws IOException {
678 jsonReader.beginArray();
683 while (jsonReader.hasNext()) {
684 ContentValues cv = readSmsValuesFromReader(jsonReader);
703 jsonReader.endArray();
731 void putMmsMessagesToProvider(JsonReader jsonReader) throws IOException {
732 jsonReader.beginArray();
[all …]
/packages/services/Car/tests/obd2_test/src/com/android/car/obd2/test/
DObd2FreezeFrameGeneratorTest.java102 JsonReader jsonReader = new JsonReader(new StringReader(stringWriter.toString())); in testObd2FreezeFrameGeneration() local
104 jsonReader.beginArray(); in testObd2FreezeFrameGeneration()
105 VehiclePropValue vehiclePropValue = diagnosticJsonReader.build(jsonReader); in testObd2FreezeFrameGeneration()
109 vehiclePropValue = diagnosticJsonReader.build(jsonReader); in testObd2FreezeFrameGeneration()
DObd2LiveFrameGeneratorTest.java81 JsonReader jsonReader = new JsonReader(new StringReader(stringWriter.toString())); in testObd2LiveFrameGeneration() local
83 VehiclePropValue vehiclePropValue = diagnosticJsonReader.build(jsonReader); in testObd2LiveFrameGeneration()
/packages/providers/TelephonyProvider/tests/src/com/android/providers/telephony/
DTelephonyBackupAgentTest.java598 JsonReader jsonReader = new JsonReader(new StringReader(EMPTY_JSON_ARRAY)); in testRestoreSms_NoSms() local
601 mTelephonyBackupAgent.putSmsMessagesToProvider(jsonReader); in testRestoreSms_NoSms()
611 JsonReader jsonReader = new JsonReader(new StringReader(addRandomDataToJson(mAllSmsJson))); in testRestoreSms_AllSms() local
614 mTelephonyBackupAgent.putSmsMessagesToProvider(jsonReader); in testRestoreSms_AllSms()
626 JsonReader jsonReader = new JsonReader(new StringReader(addRandomDataToJson(mAllSmsJson))); in testRestoreSms_WithException() local
644 mTelephonyBackupAgent.putSmsMessagesToProvider(jsonReader); in testRestoreSms_WithException()
658 JsonReader jsonReader = new JsonReader(new StringReader(EMPTY_JSON_ARRAY)); in testRestoreMms_NoMms() local
661 mTelephonyBackupAgent.putMmsMessagesToProvider(jsonReader); in testRestoreMms_NoMms()
670 JsonReader jsonReader = new JsonReader(new StringReader(addRandomDataToJson(mAllMmsJson))); in testRestoreMms_AllMms() local
673 mTelephonyBackupAgent.putMmsMessagesToProvider(jsonReader); in testRestoreMms_AllMms()
[all …]
/packages/apps/Car/Dialer/framework/fake/src/com/android/car/dialer/framework/testdata/
DDataParser.java74 JsonReader jsonReader = new JsonReader(new InputStreamReader(inputStream)); in getRawDataList() local
76 rawDataList = gson.fromJson(jsonReader, type); in getRawDataList()
78 jsonReader.close(); in getRawDataList()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarDiagnosticManagerTest.java558 JsonReader jsonReader = new JsonReader(stringReader); in testDiagnosticJson() local
559 DiagnosticJson diagnosticJson = DiagnosticJson.build(jsonReader); in testDiagnosticJson()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/storagemonitoring/
DCarStorageMonitoringTest.java220 JsonReader jsonReader = new JsonReader(stringReader); in testWearEstimateJson() local
221 WearEstimate newWearEstimate = new WearEstimate(jsonReader); in testWearEstimateJson()