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

Commit 91dfc8d8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fixed EmulatedUserHal so it supports...

Merge "Fixed EmulatedUserHal so it supports SwitchUserMessageType::VEHICLE_REQUEST" into rvc-qpr-dev am: 6e5eedbf am: 8de72df4

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

Change-Id: I52c09b0f79709567b1d5d2226e9d405d07fdab8c
parents 7c7adf42 8de72df4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -155,6 +155,15 @@ android::base::Result<std::unique_ptr<VehiclePropValue>> EmulatedUserHal::onSetS
    }

    if (value.areaId != 0) {
        if (value.value.int32Values.size() >= 2 &&
            static_cast<SwitchUserMessageType>(value.value.int32Values[1]) ==
                    SwitchUserMessageType::VEHICLE_REQUEST) {
            // User HAL can also request a user switch, so we need to check it first
            ALOGD("set(SWITCH_USER) called from lshal to emulate a vehicle request: %s",
                  toString(value).c_str());
            return std::unique_ptr<VehiclePropValue>(new VehiclePropValue(value));
        }
        // Otherwise, we store it
        ALOGD("set(SWITCH_USER) called from lshal; storing it: %s", toString(value).c_str());
        mSwitchUserResponseFromCmd.reset(new VehiclePropValue(value));
        return {};