Add PASSENGER_DISPLAY_BRIGHTNESS property

- DISPLAY_BRIGHTNESS can send a brightness to be applied on one display.
- On multi-display devices, brightness of each display should be
  communicated separately to VHAL.
- PASSENGER_DISPLAY_BRIGHTNESS is added to serve that purpose.

Bug: 269186221
Test: build okay
Change-Id: I749ecd451afc4f24039f6e594860f1cb0fcf3509
(cherry picked from commit b9748bad63)
Merged-In: I749ecd451afc4f24039f6e594860f1cb0fcf3509
This commit is contained in:
Eric Jeong
2023-02-15 12:48:45 -08:00
committed by Cherrypicker Worker
parent cb34a1dc4d
commit a9a3ec3e1a
6 changed files with 38 additions and 3 deletions

View File

@@ -119,6 +119,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
{VehicleProperty::AP_POWER_STATE_REPORT, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::AP_POWER_BOOTUP_REASON, VehiclePropertyAccess::READ},
{VehicleProperty::DISPLAY_BRIGHTNESS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::PER_DISPLAY_BRIGHTNESS, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::HW_KEY_INPUT, VehiclePropertyAccess::READ},
{VehicleProperty::HW_KEY_INPUT_V2, VehiclePropertyAccess::READ},
{VehicleProperty::HW_MOTION_INPUT, VehiclePropertyAccess::READ},

View File

@@ -119,6 +119,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
{VehicleProperty::AP_POWER_STATE_REPORT, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AP_POWER_BOOTUP_REASON, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::DISPLAY_BRIGHTNESS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::PER_DISPLAY_BRIGHTNESS, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HW_KEY_INPUT, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HW_KEY_INPUT_V2, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HW_MOTION_INPUT, VehiclePropertyChangeMode::ON_CHANGE},

View File

@@ -111,6 +111,7 @@ public final class AccessForVehicleProperty {
Map.entry(VehicleProperty.AP_POWER_STATE_REPORT, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.AP_POWER_BOOTUP_REASON, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.DISPLAY_BRIGHTNESS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.PER_DISPLAY_BRIGHTNESS, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.HW_KEY_INPUT, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.HW_KEY_INPUT_V2, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.HW_MOTION_INPUT, VehiclePropertyAccess.READ),

View File

@@ -111,6 +111,7 @@ public final class ChangeModeForVehicleProperty {
Map.entry(VehicleProperty.AP_POWER_STATE_REPORT, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AP_POWER_BOOTUP_REASON, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.DISPLAY_BRIGHTNESS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.PER_DISPLAY_BRIGHTNESS, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.HW_KEY_INPUT, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.HW_KEY_INPUT_V2, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.HW_MOTION_INPUT, VehiclePropertyChangeMode.ON_CHANGE),

View File

@@ -117,6 +117,7 @@ enum VehicleProperty {
AP_POWER_STATE_REPORT = (((0x0A01 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475073 */,
AP_POWER_BOOTUP_REASON = (((0x0A02 + 0x10000000) + 0x01000000) + 0x00400000) /* 289409538 */,
DISPLAY_BRIGHTNESS = (((0x0A03 + 0x10000000) + 0x01000000) + 0x00400000) /* 289409539 */,
PER_DISPLAY_BRIGHTNESS = (((0x0A04 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475076 */,
HW_KEY_INPUT = (((0x0A10 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475088 */,
HW_KEY_INPUT_V2 = (((0x0A11 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED) /* 367004177 */,
HW_MOTION_INPUT = (((0x0A12 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED) /* 367004178 */,

View File

@@ -1252,9 +1252,16 @@ enum VehicleProperty {
AP_POWER_BOOTUP_REASON = 0x0A02 + 0x10000000 + 0x01000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32
/**
* Property to represent brightness of the display. Some cars have single
* control for the brightness of all displays and this property is to share
* change in that control.
* Property to represent brightness of the display.
*
* Some cars have single control for the brightness of all displays and this
* property is to share change in that control. In cars which have displays
* whose brightness is controlled separately, they must use
* PER_DISPLAY_BRIGHTNESS.
*
* Only one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be
* implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by
* AAOS.
*
* If this is writable, android side can set this value when user changes
* display brightness from Settings. If this is read only, user may still
@@ -1266,6 +1273,29 @@ enum VehicleProperty {
*/
DISPLAY_BRIGHTNESS = 0x0A03 + 0x10000000 + 0x01000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32
/**
* Property to represent brightness of the displays which are controlled separately.
*
* Some cars have one or more displays whose brightness is controlled
* separately and this property is to inform the brightness of each
* passenger display. In cars where all displays' brightness is controlled
* together, they must use DISPLAY_BRIGHTNESS.
*
* Only one of DISPLAY_BRIGHTNESS and PER_DISPLAY_BRIGHTNESS should be
* implemented. If both are available, PER_DISPLAY_BRIGHTNESS is used by
* AAOS.
*
* The display port uniquely identifies a physical connector on the device
* for display output, ranging from 0 to 255.
*
* int32Values[0] : display port
* int32Values[1] : brightness
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
PER_DISPLAY_BRIGHTNESS = 0x0A04 + 0x10000000 + 0x01000000
+ 0x00410000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32_VEC
/**
* Property to feed H/W input events to android
*