mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Fixed EmulatedUserHal so it supports SwitchUserMessageType::VEHICLE_REQUEST" into rvc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6e5eedbfef
@@ -155,6 +155,15 @@ android::base::Result<std::unique_ptr<VehiclePropValue>> EmulatedUserHal::onSetS
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (value.areaId != 0) {
|
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());
|
ALOGD("set(SWITCH_USER) called from lshal; storing it: %s", toString(value).c_str());
|
||||||
mSwitchUserResponseFromCmd.reset(new VehiclePropValue(value));
|
mSwitchUserResponseFromCmd.reset(new VehiclePropValue(value));
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
Reference in New Issue
Block a user