diff options
author | Yuncheol Heo <ycheo@google.com> | 2022-09-29 18:24:12 -0700 |
---|---|---|
committer | Yuncheol Heo <ycheo@google.com> | 2022-10-04 01:18:32 -0700 |
commit | dfe6bbb7a7cb08dda59ceb5d4cfc199fa10b5685 (patch) | |
tree | 19b4512da7e08975270bac40ee9e607f1e8da9fe | |
parent | 0c55c653f39585a85d6f138de039d3b0dc8fe2a0 (diff) | |
download | car-dfe6bbb7a7cb08dda59ceb5d4cfc199fa10b5685.tar.gz |
Add a sdk_car_md_x86_64 configuration.
- This also adds multi-display settings for sdk_car_md.
Bug 248584504
Test: m sdk_car_md_x86_64-userdebug
Test: Check the md emulator has 4 displays.
BYPASS_INCLUSIVE_LANGUAGE_REASON=migrating existing configuration.
Change-Id: I7c01e17621db59303a1848dcfab2f1f2581d8d75
-rw-r--r-- | AndroidProducts.mk | 2 | ||||
-rw-r--r-- | emulator/multi-display/car_audio_configuration.xml | 114 | ||||
-rw-r--r-- | emulator/multi-display/display_settings.xml | 23 | ||||
-rw-r--r-- | emulator/multi-display/input/virtio_input_multi_touch_7.idc | 12 | ||||
-rw-r--r-- | emulator/multi-display/input/virtio_input_multi_touch_8.idc | 12 | ||||
-rw-r--r-- | emulator/multi-display/input/virtio_input_multi_touch_9.idc | 12 | ||||
-rw-r--r-- | emulator/multi-display/overlay/frameworks/base/core/res/res/values/config.xml | 63 | ||||
-rw-r--r-- | sdk_car_md_x86_64.mk | 61 |
8 files changed, 299 insertions, 0 deletions
diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 0240d02..aae2e88 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -23,6 +23,7 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/car_x86_64.mk \ $(LOCAL_DIR)/gsi_car_arm64.mk \ $(LOCAL_DIR)/gsi_car_x86_64.mk \ + $(LOCAL_DIR)/sdk_car_md_x86_64.mk \ COMMON_LUNCH_CHOICES := \ @@ -34,6 +35,7 @@ COMMON_LUNCH_CHOICES := \ car_x86_64-userdebug \ gsi_car_arm64-userdebug \ gsi_car_x86_64-userdebug \ + sdk_car_md_x86_64-userdebug \ EMULATOR_VENDOR_NO_SOUND_TRIGGER := false diff --git a/emulator/multi-display/car_audio_configuration.xml b/emulator/multi-display/car_audio_configuration.xml new file mode 100644 index 0000000..6fd5ddb --- /dev/null +++ b/emulator/multi-display/car_audio_configuration.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- + Defines the audio configuration in a car, including + - Audio zones + - Context to audio bus mappings + - Volume groups + in the car environment. +--> +<carAudioConfiguration version="2"> + <zones> + <zone name="primary zone" isPrimary="true" occupantZoneId="0"> + <volumeGroups> + <group> + <device address="bus0_media_out"> + <context context="music"/> + </device> + <device address="bus3_call_ring_out"> + <context context="call_ring"/> + </device> + <device address="bus6_notification_out"> + <context context="notification"/> + </device> + </group> + <group> + <device address="bus1_navigation_out"> + <context context="navigation"/> + </device> + <device address="bus2_voice_command_out"> + <context context="voice_command"/> + </device> + </group> + <group> + <device address="bus4_call_out"> + <context context="call"/> + </device> + </group> + <group> + <device address="bus5_alarm_out"> + <context context="alarm"/> + </device> + <device address="bus7_system_sound_out"> + <context context="system_sound"/> + <context context="emergency"/> + <context context="safety"/> + <context context="vehicle_status"/> + <context context="announcement"/> + </device> + </group> + </volumeGroups> + <inputDevices> + <inputDevice address="input_bus_tone_zone_0"/> + <inputDevice address="tuner0"/> + </inputDevices> + </zone> + <zone name="front passenger zone 1" audioZoneId="1" occupantZoneId="1"> + <volumeGroups> + <group> + <device address="bus100_audio_zone_1"> + <context context="music"/> + <context context="navigation"/> + <context context="voice_command"/> + <context context="call_ring"/> + <context context="call"/> + <context context="alarm"/> + <context context="notification"/> + <context context="system_sound"/> + <context context="emergency"/> + <context context="safety"/> + <context context="vehicle_status"/> + <context context="announcement"/> + </device> + </group> + </volumeGroups> + <inputDevices> + <inputDevice address="input_bus_tone_zone_1"/> + </inputDevices> + </zone> + <zone name="rear seat zone 2" audioZoneId="2" occupantZoneId="2"> + <volumeGroups> + <group> + <device address="bus200_audio_zone_2"> + <context context="music"/> + <context context="navigation"/> + <context context="voice_command"/> + <context context="call_ring"/> + <context context="call"/> + <context context="alarm"/> + <context context="notification"/> + <context context="system_sound"/> + <context context="emergency"/> + <context context="safety"/> + <context context="vehicle_status"/> + <context context="announcement"/> + </device> + </group> + </volumeGroups> + </zone> + </zones> +</carAudioConfiguration> diff --git a/emulator/multi-display/display_settings.xml b/emulator/multi-display/display_settings.xml new file mode 100644 index 0000000..ad23b79 --- /dev/null +++ b/emulator/multi-display/display_settings.xml @@ -0,0 +1,23 @@ +<?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" + forcedDensity="120" + dontMoveToTop="true"/> + +<!-- Display settings for 2nd Home --> +<display name="port:2" + shouldShowSystemDecors="true" + shouldShowIme="true" + forcedDensity="120" /> + +<!-- Display settings for 3rd Home --> +<display name="port:3" + shouldShowSystemDecors="true" + shouldShowIme="true" + forcedDensity="120" /> + +</display-settings> diff --git a/emulator/multi-display/input/virtio_input_multi_touch_7.idc b/emulator/multi-display/input/virtio_input_multi_touch_7.idc new file mode 100644 index 0000000..388337f --- /dev/null +++ b/emulator/multi-display/input/virtio_input_multi_touch_7.idc @@ -0,0 +1,12 @@ +device.internal = 1 + +touch.deviceType = touchScreen +touch.orientationAware = 1 + +cursor.mode = navigation +cursor.orientationAware = 1 + +# This displayID matches the unique ID of the virtual display created for Emulator. +# This will indicate to input flinger than it should link this input device +# with the virtual display. +touch.displayId = local:4619827551948147201 diff --git a/emulator/multi-display/input/virtio_input_multi_touch_8.idc b/emulator/multi-display/input/virtio_input_multi_touch_8.idc new file mode 100644 index 0000000..726843a --- /dev/null +++ b/emulator/multi-display/input/virtio_input_multi_touch_8.idc @@ -0,0 +1,12 @@ +device.internal = 1 + +touch.deviceType = touchScreen +touch.orientationAware = 1 + +cursor.mode = navigation +cursor.orientationAware = 1 + +# This displayID matches the unique ID of the virtual display created for Emulator. +# This will indicate to input flinger than it should link this input device +# with the virtual display. +touch.displayId = local:4619827124781842690 diff --git a/emulator/multi-display/input/virtio_input_multi_touch_9.idc b/emulator/multi-display/input/virtio_input_multi_touch_9.idc new file mode 100644 index 0000000..01d55b0 --- /dev/null +++ b/emulator/multi-display/input/virtio_input_multi_touch_9.idc @@ -0,0 +1,12 @@ +device.internal = 1 + +touch.deviceType = touchScreen +touch.orientationAware = 1 + +cursor.mode = navigation +cursor.orientationAware = 1 + +# This displayID matches the unique ID of the virtual display created for Emulator. +# This will indicate to input flinger than it should link this input device +# with the virtual display. +touch.displayId = local:4619827540095559171 diff --git a/emulator/multi-display/overlay/frameworks/base/core/res/res/values/config.xml b/emulator/multi-display/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..6efc094 --- /dev/null +++ b/emulator/multi-display/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2019, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Whether the system enables per-display focus. If the system has the input method for each + display, this value should be true. --> + <bool name="config_perDisplayFocusEnabled">true</bool> + + <!-- Maximum number of supported users --> + <integer name="config_multiuserMaximumUsers">5</integer> + + <!-- Maximum number of users we allow to be running at a time --> + <integer name="config_multiuserMaxRunningUsers">5</integer> + + <!-- True if the device supports system decorations on secondary displays. --> + <bool name="config_supportsSystemDecorsOnSecondaryDisplays">true</bool> + <!-- This is the default launcher package with an activity to use on secondary displays that + support system decorations. + This launcher package must have an activity that supports multiple instances and has + corresponding launch mode set in AndroidManifest. + {@see android.view.Display#FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS} --> + <string name="config_secondaryHomePackage" translatable="false">com.android.car.multidisplay</string> + <!-- Whether to only install system packages on a user if they're whitelisted for that user + type. These are flags and can be freely combined. + 0 - disable whitelist (install all system packages; no logging) + 1 - enforce (only install system packages if they are whitelisted) + 2 - log (log non-whitelisted packages) + 4 - any package not mentioned in the whitelist file is implicitly whitelisted on all users + 8 - same as 4, but just for the SYSTEM user + 16 - ignore OTAs (don't install system packages during OTAs) + Common scenarios: + - to enable feature (fully enforced) for a complete whitelist: 1 + - to enable feature for an incomplete whitelist (so use implicit whitelist mode): 5 + - to enable feature but implicitly whitelist for SYSTEM user to ease local development: 9 + - to disable feature completely if it had never been enabled: 16 + - to henceforth disable feature and try to undo its previous effects: 0 + Note: This list must be kept current with PACKAGE_WHITELIST_MODE_PROP in + frameworks/base/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java + Package whitelist disabled for testing profile user as default whitelist does not + support PROFILE user. --> + <integer name="config_userTypePackageWhitelistMode">2</integer> + + <!-- Whether the device allows users to start in background on secondary displays. + Should be false for most devices, except automotive vehicle with passenger displays. --> + <bool name="config_multiuserUsersOnSecondaryDisplays">true</bool> + +</resources> diff --git a/sdk_car_md_x86_64.mk b/sdk_car_md_x86_64.mk new file mode 100644 index 0000000..c68947b --- /dev/null +++ b/sdk_car_md_x86_64.mk @@ -0,0 +1,61 @@ +# +# Copyright (C) 2022 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# this overwrites Android Emulator's default input devices for virtual displays in device/generic/goldfish/input/ +PRODUCT_COPY_FILES += \ + device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_7.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_7.idc \ + device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_8.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_8.idc \ + device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_9.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_9.idc + +# Overrides Goldfish's default display_settings.xml +PRODUCT_COPY_FILES += \ + device/generic/car/emulator/multi-display/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml + +PRODUCT_PACKAGE_OVERLAYS += \ + device/generic/car/emulator/multi-display/overlay + +PRODUCT_COPY_FILES += \ + device/generic/car/emulator/multi-display/car_audio_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/car_audio_configuration.xml + +# Use to disable cluster display definitions in aosp_car_emulator +BUILD_EMULATOR_CLUSTER_DISPLAY := false +# Disable dynamic multidisplay support in the base target. +EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG := false +PRODUCT_PRODUCT_PROPERTIES += \ + hwservicemanager.external.displays=1,400,600,120,0,2,800,600,120,0,3,800,600,120,0 \ + persist.service.bootanim.displays=4619827551948147201,4619827124781842690,4619827540095559171 + +PRODUCT_PACKAGES += ClusterHomeSample ClusterOsDouble +PRODUCT_PACKAGES += CarServiceOverlayEmulatorOsDouble CarServiceOverlayMdEmulatorOsDouble + +# Enable MZ audio by default +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ + ro.aae.simulateMultiZoneAudio=true \ + persist.sys.max_profiles=5 \ + com.android.car.internal.debug.num_auto_populated_users=1 + +PRODUCT_PACKAGES += \ + MultiDisplaySecondaryHomeTestLauncher \ + MultiDisplayTest + +$(call inherit-product, device/generic/goldfish/car/sdk_car_x86_64.mk) + +PRODUCT_NAME := sdk_car_md_x86_64 +PRODUCT_DEVICE := emulator_car_x86_64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := Car multi-display on x86_64 emulator |