Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e6e021d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[automotive] Use new jsoncpp API" am: 3d22587c am: aff567a8 am:...

Merge "[automotive] Use new jsoncpp API" am: 3d22587c am: aff567a8 am: e198860c am: fbd34c5d

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1608216

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I77385d6f7b87356f2b530ef025f1db21f35dc416
parents e5a17fb3 fbd34c5d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -96,11 +96,12 @@ bool JsonFakeValueGenerator::hasNext() {
std::vector<VehiclePropValue> JsonFakeValueGenerator::parseFakeValueJson(std::istream& is) {
    std::vector<VehiclePropValue> fakeVhalEvents;

    Json::Reader reader;
    Json::CharReaderBuilder builder;
    Json::Value rawEvents;
    if (!reader.parse(is, rawEvents)) {
    std::string errorMessage;
    if (!Json::parseFromStream(builder, is, &rawEvents, &errorMessage)) {
        ALOGE("%s: Failed to parse fake data JSON file. Error: %s", __func__,
              reader.getFormattedErrorMessages().c_str());
              errorMessage.c_str());
        return fakeVhalEvents;
    }