From 1a87dbca80c16749addebaf4c18d5782ac2f39a3 Mon Sep 17 00:00:00 2001 From: Min Yun Date: Wed, 25 Sep 2019 07:46:54 +0900 Subject: [PATCH] Change AP_POWER_STATE_REPORT's access property. Change AP_POWER_STATE_REPORT's access property from WRITE to READ_WRITE. In Vehicle environment some hals communicate with external ecu, so they must know the boot reason. (Not only on, but DEEP_SLEEPY_EXIT, ON, CANCELD) To handle this, AOSP provide CarPowerManager, but it use AIDL. But, in treble, vendor process must communicate with system process via hidl. So, vendor processes(almost hal), can't use CarPowerManager. (Beside, CarPowerManager use /dev/binder but vendor process use /dev/vndbinder). If hals subscribe AP_POWER_STATE_REPORT via vehicle hal, they can handle the power state. bug: 140370318 Merged-In: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948 Change-Id: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948 --- automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h | 2 +- automotive/vehicle/2.0/types.hal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h index a46de24b16..fc441edaef 100644 --- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h @@ -671,7 +671,7 @@ const ConfigDeclaration kVehicleProperties[]{ .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}}}, {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT), - .access = VehiclePropertyAccess::WRITE, + .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE}, .initialValue = {.int32Values = {toInt(VehicleApPowerStateReport::WAIT_FOR_VHAL), 0}}}, diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal index f6ebcdd7d0..0f20dd18c0 100644 --- a/automotive/vehicle/2.0/types.hal +++ b/automotive/vehicle/2.0/types.hal @@ -1282,7 +1282,7 @@ enum VehicleProperty : int32_t { * * @change_mode VehiclePropertyChangeMode:ON_CHANGE - * @access VehiclePropertyAccess:WRITE + * @access VehiclePropertyAccess:READ_WRITE */ AP_POWER_STATE_REPORT = ( 0x0A01