Fixed EmulatedUserHal so it supports SwitchUserMessageType::VEHICLE_REQUEST am: 5d40b783d1
am: 645bd8a6fa
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1425311 Change-Id: Ic828eb136b8f686ada88166a56695c78d336d520
This commit is contained in:
commit
d4918ea194
1 changed files with 9 additions and 0 deletions
|
@ -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 {};
|
||||
|
|
Loading…
Reference in a new issue