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

Commit fbd34c5d 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: e198860c

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id90eb2e4b62863e858eca8915084c6fec421a472
parents ae2f5cff e198860c
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;
    }