car: show instrument cluster on secondary display

* Fixes https://github.com/raspberry-vanilla/android_local_manifest/issues/43
This commit is contained in:
Konsta
2024-09-06 23:24:03 +03:00
parent 8829ea27fa
commit d730ccf1c6
3 changed files with 45 additions and 0 deletions

View File

@@ -63,6 +63,10 @@ PRODUCT_PACKAGES += \
canhaldump \ canhaldump \
canhalsend canhalsend
# Display
PRODUCT_COPY_FILES += \
$(DEVICE_CAR_PATH)/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml
# EVS # EVS
ENABLE_CAREVSSERVICE_SAMPLE := true ENABLE_CAREVSSERVICE_SAMPLE := true
ENABLE_EVS_SAMPLE := true ENABLE_EVS_SAMPLE := true

8
car/display_settings.xml Normal file
View File

@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<display-settings>
<!-- Use physical port number instead of local id -->
<config identifier="1" />
<!-- Display settings for cluster -->
<display name="port:1" dontMoveToTop="true" />
</display-settings>

View File

@@ -18,6 +18,39 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!--
Specifies configuration of displays in system telling its usage / type and assigned
occupant. DEFAULT_DISPLAY, if assigned here, should be always assigned to the DRIVER zone.
Some examples are:
<item>displayPort=0,displayType=MAIN,occupantZoneId=0,inputTypes=DPAD_KEYS|
NAVIGATE_KEYS|ROTARY_NAVIGATION</item>
<item>displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0,
inputTypes=DPAD_KEYS</item>
<item>displayPort=2,displayType=MAIN,occupantZoneId=1,
inputTypes=TOUCH_SCREEN</item>
<item>displayPort=3,displayType=MAIN,occupantZoneId=2,
inputTypes=TOUCH_SCREEN</item>
<item>displayUniqueId=virtual:com.example:MainD,displayType=MAIN,occupantZoneId=3,
inputTypes=TOUCH_SCREEN</item>
NOTE: each item should have displayPort or displayUniqueId, if it has both, displayPort
will be used.
displayPort: Unique Port id for the physical display.
displayUniqueId: Unique Id for the display.
The unique id of the virtual display will be the form of 'virtual:<PACKAGE>:<ID>'.
displayType: Display type for the display. Use * part from
CarOccupantZoneManager.DISPLAY_TYPE_* like MAIN, INSTRUMENT_CLUSTER and
etc.
occupantZoneId: occupantZoneId specified from config_occupant_zones.
inputTypes: supported input types for the corresponding display.
-->
<string-array translatable="false" name="config_occupant_display_mapping">
<item>displayPort=0,displayType=MAIN,occupantZoneId=0,inputTypes=TOUCH_SCREEN|DPAD_KEYS|NAVIGATE_KEYS|ROTARY_NAVIGATION</item>
<item>displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0,inputTypes=DPAD_KEYS</item>
</string-array>
<!-- Specifies notice UI that will be launched when user starts a car or do user <!-- Specifies notice UI that will be launched when user starts a car or do user
switching. It is recommended to use dialog with at least TYPE_APPLICATION_OVERLAY window switching. It is recommended to use dialog with at least TYPE_APPLICATION_OVERLAY window
type to show the UI regardless of activity launches. Target package will be auto-granted type to show the UI regardless of activity launches. Target package will be auto-granted