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

Commit 5559a584 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7206732 from 5b30be06 to sc-v2-release

Change-Id: I558d3479b5f34658eaba7c7d64bf55da5aa59e80
parents cf7d9988 5b30be06
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -276,17 +276,6 @@ static bool isDiagnosticProperty(VehiclePropConfig propConfig) {
    return false;
}

// determine if it's running inside Android Emulator
static bool isInEmulator() {
    char propValue[PROP_VALUE_MAX];
    bool isEmulator = (__system_property_get("ro.kernel.qemu", propValue) != 0);
    if (!isEmulator) {
        isEmulator = (__system_property_get("ro.hardware", propValue) != 0) &&
                     (!strcmp(propValue, "ranchu") || !strcmp(propValue, "goldfish"));
    }
    return isEmulator;
}

// Parse supported properties list and generate vector of property values to hold current values.
void EmulatedVehicleHal::onCreate() {
    static constexpr bool shouldUpdateStatus = true;
+5 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ VehicleEmulator::VehicleEmulator(EmulatedVehicleHalIface* hal) : mHal{hal} {
    mSocketComm = std::make_unique<SocketComm>(this);
    mSocketComm->start();

    if (android::base::GetBoolProperty("ro.kernel.qemu", false)) {
    if (isInEmulator()) {
        ALOGI("Starting PipeComm");
        mPipeComm = std::make_unique<PipeComm>(this);
        mPipeComm->start();
@@ -226,6 +226,10 @@ void VehicleEmulator::populateProtoVehiclePropValue(vhal_proto::VehiclePropValue
    return proto_msg_converter::toProto(protoVal, *val);
}

bool isInEmulator() {
    return android::base::GetBoolProperty("ro.boot.qemu", false);
}

}  // impl

}  // namespace V2_0
+3 −0
Original line number Diff line number Diff line
@@ -95,6 +95,9 @@ private:
    std::unique_ptr<PipeComm> mPipeComm;
};

// determine if it's running inside Android Emulator
bool isInEmulator();

}  // impl

}  // namespace V2_0
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ aidl_interface {
            },
        },
        cpp: {
            enabled: false,
            enabled: true,
        },
    },
}
+8 −9
Original line number Diff line number Diff line
@@ -70,10 +70,6 @@ void FilterCallback::filterThreadLoop(DemuxFilterEvent& /* event */) {
}

bool FilterCallback::readFilterEventData() {
    if (mFilterMQ == NULL) {
        ALOGW("[vts] FMQ is not configured and does not need to be tested.");
        return true;
    }
    bool result = false;
    DemuxFilterEvent filterEvent = mFilterEvent;
    ALOGW("[vts] reading from filter FMQ or buffer %d", mFilterId);
@@ -95,16 +91,19 @@ bool FilterCallback::readFilterEventData() {
        }
        // EXPECT_TRUE(mDataLength == goldenDataOutputBuffer.size()) << "buffer size does not
        // match";

        if (mFilterMQ != NULL) {
            mDataOutputBuffer.resize(mDataLength);
            result = mFilterMQ->read(mDataOutputBuffer.data(), mDataLength);
            EXPECT_TRUE(result) << "can't read from Filter MQ";
        }

        /*for (int i = 0; i < mDataLength; i++) {
            EXPECT_TRUE(goldenDataOutputBuffer[i] == mDataOutputBuffer[i]) << "data does not match";
        }*/
    }
    if (mFilterMQ != NULL) {
        mFilterMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_CONSUMED));
    }
    return result;
}

Loading