System Bars for Multi Display AUXILIARY Screens AOSP14

7 hours ago 1
ARTICLE AD BOX

I'm trying to build a Mutli-Display Car Emulator Screen using android14-qpr1-release using target sdk_car_md_x86_64-userdebug.
My intention is to have a Main screen and an AUXILIARY screen which has the same occupant zone id, which i was able to achieve by modifying config_occupant_display_mapping in rro_overlays/config.xml to

<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=2,displayType=AUXILIARY,occupantZoneId=0,inputTypes=TOUCH_SCREEN</item> </string-array>

and also modified car_md.mk to

EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG := false BUILD_EMULATOR_CLUSTER_DISPLAY := true # Set up additional displays EMULATOR_MULTIDISPLAY_HW_CONFIG := 1,968,792,160,0,2,1920,720,160,0 EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG := 4619827551948147201,4619827124781842690 ENABLE_CLUSTER_OS_DOUBLE:=true Result: CarSystemUIApplication Found Displays = [Display id 0: DisplayInfo{"Built-in Screen", displayId 0, displayGroupId 0, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_TRUSTED, real 1920 x 720, largest app 1920 x 1748, smallest app 720 x 548, appVsyncOff 1000000, presDeadline 16666666, mode 160.000004, defaultMode 1, modes [{id=1, width=1920, height=720, fps=60.000004, alternativeRefreshRates=[], supportedHdrTypes=[]}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[], mMaxLuminance=500.0, mMaxAverageLuminance=500.0, mMinLuminance=0.0}, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state ON, committedState ON}, DisplayMetrics{density=1.0, width=1920, height=624, scaledDensity=1.0, xdpi=160.0, ydpi=160.0}, isValid=true, Display id 2: DisplayInfo{"Built-in Screen", displayId 2, displayGroupId 1, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_TRUSTED, real 1920 x 720, largest app 1920 x 1920, smallest app 720 x 720, appVsyncOff 2000000, presDeadline 6250000, mode 3160.0, defaultMode 3, modes [{id=3, width=1920, height=720, fps=160.0, alternativeRefreshRates=[], supportedHdrTypes=[]}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[], mMaxLuminance=500.0, mMaxAverageLuminance=500.0, mMinLuminance=0.0}, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state UNKNOWN, committedState UNKNOWN}, DisplayMetrics{density=1.0, width=1920, height=720, scaledDensity=1.0, xdpi=160.0, ydpi=160.0}, isValid=true]

The Issue now is that the Secondary Display does not have any System bars attached to it.
I have created a custom activity using launcher category SECONDARY_HOME for my custom launcher home, but no system bars are attached to it.

<string name="config_passengerLauncherComponent">com.android.car.carlauncher/.SecondaryHomeActivity</string>

I verified via DisplayPolicy.java that my 2nd display mDisplayContent.supportsSystemDecorations() is True

System Bars are drawn by default for MUMD screens, and since my screen is a AUXILIARY type i cant find a way for bottom bar to support. Any idea how can we achieve this?

emulator image

Read Entire Article