summaryrefslogtreecommitdiff
path: root/emulator/cluster/rro_overlays
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 00:56:28 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 00:56:28 +0000
commit8e41c58f50bd5cf6ffd52015ad13f3286e769977 (patch)
tree5b4454f2d580cd508a0ae813426d1af7c2918985 /emulator/cluster/rro_overlays
parent10845bed61a0fc3e462ab47b3eff17a4cb66c6e4 (diff)
parentcdc234e51141674a4ff6a4d89b50f0764c50cd94 (diff)
downloadcar-8e41c58f50bd5cf6ffd52015ad13f3286e769977.tar.gz
Change-Id: I39068831946eda31c65dd562abb03f0b1a8e7d9c
Diffstat (limited to 'emulator/cluster/rro_overlays')
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml23
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/Android.bp35
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/AndroidManifest.xml27
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/values/config.xml157
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/car_ux_restrictions_map.xml104
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/overlays.xml24
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/Android.bp34
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/AndroidManifest.xml26
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml105
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/car_ux_restrictions_map.xml94
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/overlays.xml23
-rw-r--r--emulator/cluster/rro_overlays/CarServiceOverlay_OsDouble/res/values/config.xml18
12 files changed, 652 insertions, 18 deletions
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml b/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml
index 40f47eb..c77764d 100644
--- a/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml
@@ -24,22 +24,27 @@
occupant.
Some examples are:
- <item>displayPort=0,displayType=MAIN,occupantZoneId=0</item>
- <item>displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0</item>
- <item>displayPort=2,displayType=MAIN,occupantZoneId=1</item>
- <item>displayPort=3,displayType=MAIN,occupantZoneId=2</item>
- <item>displayPort=4,displayType=MAIN,occupantZoneId=3</item>
+ <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>
+ <item>displayPort=2,displayType=MAIN,occupantZoneId=1,
+ inputTypes=NAVIGATE_KEYS</item>
+ <item>displayPort=3,displayType=MAIN,occupantZoneId=2,
+ inputTypes=NAVIGATE_KEYS</item>
+ <item>displayUniqueId=virtual:com.example:MainD,displayType=MAIN,occupantZoneId=3,
+ inputTypes=NAVIGATE_KEYS</item>
displayPort: Unique port id for the display.
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</item>
- <item>displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0</item>
+ <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>
<!--
@@ -56,8 +61,8 @@
The default list defined below will enable all optional features defined.
-->
- <!-- TODO(b/205908527): this overlay is to temporarily disable CarEvsService by default. -->
<string-array translatable="false" name="config_allowed_optional_car_features">
+ <item>car_evs_service</item>
<item>car_navigation_service</item>
<item>cluster_service</item>
<item>com.android.car.user.CarUserNoticeService</item>
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/Android.bp b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/Android.bp
new file mode 100644
index 0000000..9cff5fb
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/Android.bp
@@ -0,0 +1,35 @@
+// Copyright (C) 2023 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.
+//
+//
+
+package {
+ default_applicable_licenses: ["device_generic_car_license"],
+}
+
+runtime_resource_overlay {
+ name: "CarServiceOverlayMdNdEmulator",
+ resource_dirs: ["res"],
+ manifest: "AndroidManifest.xml",
+ sdk_version: "current",
+ product_specific: true
+}
+
+override_runtime_resource_overlay {
+ name: "CarServiceOverlayMdNdEmulatorGoogle",
+ base: "CarServiceOverlayMdNdEmulator",
+ package_name: "com.google.android.car.resources.mdnd_emulator",
+ target_package_name: "com.google.android.car.updatable",
+}
+
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/AndroidManifest.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/AndroidManifest.xml
new file mode 100644
index 0000000..caf4090
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.car.resources.mdnd_emulator">
+ <application android:hasCode="false"/>
+ <!-- priority should be higher than CarServiceOverlayMdEmulatorOsDouble -->
+ <overlay android:priority="5003"
+ android:targetPackage="com.android.car.updatable"
+ android:targetName="CarServiceCustomization"
+ android:resourcesMap="@xml/overlays"
+ android:isStatic="true" />
+</manifest>
+
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/values/config.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/values/config.xml
new file mode 100644
index 0000000..2182a64
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/values/config.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2023, 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 to configure car service based on each OEM's preference. -->
+<resources>
+ <!--
+ Lists all occupant zones available in the car.
+ Some examples are:
+ <item>occupantZoneId=0,occupantType=DRIVER,seatRow=1,seatSide=driver</item>
+ <item>occupantZoneId=1,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=oppositeDriver</item>
+ <item>occupantZoneId=2,occupantType=REAR_PASSENGER,seatRow=2,seatSide=left</item>
+ <item>occupantZoneId=3,occupantType=REAR_PASSENGER,seatRow=2,seatSide=right</item>
+
+ occupantZoneId: Unique unsigned integer id to represent each passenger zone. Each zone
+ should have different id.
+ occupantType: Occupant type for the display. Use * part from
+ CarOccupantZoneManager.OCCUPANT_TYPE_* like DRIVER, FRONT_PASSENGER,
+ REAR_PASSENGER and etc.
+ seatRow: Integer telling which row the seat is located. Row 1 is for front seats.
+ seatSide: left/center/right for known side. Or can use driver/center/oppositeDriver to
+ handle both right-hand driving and left-hand driving in one place.
+ If car's RHD / LHD is not specified, LHD will be assumed and driver side becomes
+ left.
+ -->
+ <string-array translatable="false" name="config_occupant_zones">
+ <item>occupantZoneId=0,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=driver</item>
+ <item>occupantZoneId=1,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=oppositeDriver</item>
+ <item>occupantZoneId=2,occupantType=REAR_PASSENGER,seatRow=2,seatSide=left</item>
+ <item>occupantZoneId=3,occupantType=REAR_PASSENGER,seatRow=2,seatSide=right</item>
+ </string-array>
+
+ <!--
+ Specifies configuration of displays in system telling its usage / type and assigned
+ occupant.
+
+ Some examples are:
+ <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>
+ <item>displayPort=2,displayType=MAIN,occupantZoneId=1,inputTypes=TOUCH_SCREEN</item>
+ <item>displayPort=3,displayType=MAIN,occupantZoneId=2,inputTypes=TOUCH_SCREEN</item>
+ <item>displayPort=4,displayType=MAIN,occupantZoneId=3,inputTypes=TOUCH_SCREEN</item>
+
+ displayPort: Unique port id for the display.
+ 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>displayUniqueId=virtual:com.android.car.cluster.osdouble:ClusterDisplay,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>displayPort=4,displayType=MAIN,occupantZoneId=3,inputTypes=TOUCH_SCREEN</item>
+ </string-array>
+
+ <!--
+ Specifies optional features that can be enabled by this image. Note that vhal can disable
+ them depending on product variation.
+ Feature name can be either service name defined in Car.*_SERVICE for Car*Manager or any
+ optional feature defined under @OptionalFeature annotation.
+ Note that '/' is used to have subfeature under main feature like "MAIN_FEATURE/SUB_FEATURE".
+
+ Some examples are:
+ <item>storage_monitoring</item>
+ <item>com.android.car.user.CarUserNoticeService</item>
+ <item>com.example.Feature/SubFeature</item>
+
+ The default list defined below will enable all optional features defined.
+ -->
+ <string-array translatable="false" name="config_allowed_optional_car_features">
+ <item>car_evs_service</item>
+ <item>car_navigation_service</item>
+ <item>car_occupant_connection_service</item>
+ <item>car_remote_device_service</item>
+ <item>cluster_home_service</item>
+ <item>com.android.car.user.CarUserNoticeService</item>
+ <item>diagnostic</item>
+ <item>storage_monitoring</item>
+ <item>vehicle_map_service</item>
+ <item>car_telemetry_service</item>
+ </string-array>
+
+ <!-- Enable profile user assignment per each CarOccupantZone for per display android user
+ assignments. This feature is still experimental. -->
+ <bool name="enableProfileUserAssignmentForMultiDisplay" translatable="false">true</bool>
+
+ <!-- The services that need to be started earlier in the boot sequence and in particular order.
+ Every item in this array contains a flatten component name of a service that needs to be
+ started and a list of parameters after hashtag symbol. Here's the format:
+
+ <item>com.bar.foo/.Service#bind={bind|start|startForeground},user={all|system|foreground},
+ trigger={asap,userUnlocked}</item>
+
+ bind: bind - start service with Context#bindService
+ start - start service with Context#startService
+ startForeground - start service with Context#startForegroundService
+ If service was bound it will be restarted unless it is constantly crashing.
+ The default value is 'start'
+ user: all - the service will be bound/started for system and all foreground users
+ system - the service will be started/bound only for system user (u0)
+ foreground - the service will be bound/started only for foreground users
+ backgroundVisible - the service will be bound/started only for background users that
+ are visible.
+ The default value is 'all'
+ trigger: indicates when the service needs to be started/bound
+ asap - the service might be bound when user is not fully loaded, be careful with
+ this value, the service also needs to have directBootAware flag set to true
+ userUnlocked - start service when user unlocked the device
+ The default value is 'userUnlocked'
+
+ If the service bound/started for foreground user it will be unbound/stopped when user
+ is no longer foreground.
+ -->
+ <string-array translatable="false" name="config_earlyStartupServices">
+ <item>com.android.car.messenger/.MessengerService#bind=startForeground,user=foreground,trigger=userUnlocked</item>
+ <item>com.google.android.companiondevicesupport/com.google.android.connecteddevice.service.ConnectedDeviceService#bind=bind,user=system,trigger=asap</item>
+ <item>com.google.android.companiondevicesupport/com.google.android.connecteddevice.service.ConnectedDeviceFgUserService#bind=bind,user=foreground,trigger=asap</item>
+ <!-- Starting Android Auto receiver service earlier for wireless projection. -->
+ <item>com.google.android.embedded.projection/com.google.android.apps.auto.aareceiver.service.PersistentService#bind=bind,user=foreground,trigger=userUnlocked</item>
+
+ <!-- eGMM Vehicle Map Service Provider -->
+ <item>com.google.android.apps.maps/com.google.android.apps.geo.autograph.vms.platform.car.CarVmsPublisherClientService#bind=bind,user=foreground,trigger=userUnlocked</item>
+
+ <!-- OEM Custom Input Reference Service -->
+ <item>com.android.car.custominput.sample/.SampleCustomInputService#bind=bind,user=foreground,trigger=userUnlocked</item>
+
+ <!-- Car Telemetry Collector Service -->
+ <item>com.android.car.cartelemetryapp/.CarMetricsCollectorService#bind=bind,user=system,trigger=asap</item>
+
+ <!-- GSR Failover service to facilitate the publishing of speed limit information when eGMM is unable to do so -->
+ <item>com.google.android.apps.geo.automotive.adas/.failover.FailoverControllerService#bind=bind,user=foreground,trigger=userUnlocked</item>
+
+ <!-- The service responsible for starting/stopping the Cast receiver. -->
+ <item>com.android.car.castreceiver/.AutomotiveCastReceiverService#bind=bind,user=foreground,trigger=userUnlocked</item>
+ <!-- Early start service for Multi-display Control Center app -->
+ <item>com.android.car.multidisplay.controlcenter/com.android.car.multidisplay.controlcenter.service.ControlCenterService#bind=bind,user=backgroundVisible,trigger=userPostUnlocked</item>
+ </string-array>
+</resources>
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/car_ux_restrictions_map.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/car_ux_restrictions_map.xml
new file mode 100644
index 0000000..337b63a
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/car_ux_restrictions_map.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2023, 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.
+*/
+-->
+
+<UxRestrictions xmlns:car="http://schemas.android.com/apk/res-auto">
+ <!-- Map the driving states to UX restrictions here -->
+ <!-- Note - The platform takes a fully restricted approach when there is no information or if
+ the information is malformed. As a result,
+ 1. Default values for requiresDistractionOptimization is true, and uxr is fully_restricted.
+ 2. If uxr != baseline, then requiresDistractionOptimization is automatically promoted to true,
+ even if it is declared as false. Because it doesn't make sense to have an non baseline UX
+ restriction without requiresDistractionOptimization set to true.
+ So if we don't want any restrictions, requiresDistractionOptimization should be explicitly
+ marked as false and uxr should be explicitly set to baseline. -->
+
+ <!--Setting baseline restrictions for all displays as this is a passenger only system-->
+ <RestrictionMapping physicalPort="0">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="moving">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <RestrictionMapping physicalPort="2">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="moving">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <RestrictionMapping physicalPort="3">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="moving">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <RestrictionMapping physicalPort="4">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="moving">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <!-- Configure restriction parameters here-->
+ <RestrictionParameters>
+ <!-- Parameters to express displayed String related restrictions -->
+ <!-- Max allowed length of general purpose strings when limit_string_length is imposed-->
+ <StringRestrictions maxLength="120"/>
+ <!-- Parameters to express content related restrictions -->
+ <!-- Max number of cumulative content items allowed to be displayed when
+ limit_content is imposed. -->
+ <!-- Maximum levels deep that the user can navigate to when limit_content is imposed. -->
+ <ContentRestrictions maxCumulativeItems="21" maxDepth="3"/>
+ </RestrictionParameters>
+
+</UxRestrictions>
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/overlays.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/overlays.xml
new file mode 100644
index 0000000..b0018f2
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdNd/res/xml/overlays.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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.
+ -->
+<overlay>
+ <item target="array/config_occupant_zones" value="@array/config_occupant_zones" />
+ <item target="array/config_occupant_display_mapping" value="@array/config_occupant_display_mapping" />
+ <item target="array/config_allowed_optional_car_features" value="@array/config_allowed_optional_car_features" />
+ <item target="bool/enableProfileUserAssignmentForMultiDisplay" value="@bool/enableProfileUserAssignmentForMultiDisplay" />
+ <item target="array/config_earlyStartupServices" value="@array/config_earlyStartupServices" />
+ <item target="xml/car_ux_restrictions_map" value="@xml/car_ux_restrictions_map" />
+</overlay>
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/Android.bp b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/Android.bp
new file mode 100644
index 0000000..db30649
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/Android.bp
@@ -0,0 +1,34 @@
+// 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.
+//
+//
+
+package {
+ default_applicable_licenses: ["device_generic_car_license"],
+}
+
+runtime_resource_overlay {
+ name: "CarServiceOverlayMdEmulatorOsDouble",
+ resource_dirs: ["res"],
+ manifest: "AndroidManifest.xml",
+ sdk_version: "current",
+ product_specific: true
+}
+
+override_runtime_resource_overlay {
+ name: "CarServiceOverlayMdEmulatorOsDoubleGoogle",
+ base: "CarServiceOverlayMdEmulatorOsDouble",
+ package_name: "com.google.android.car.resources.md_emulator.osdouble",
+ target_package_name: "com.google.android.car.updatable",
+}
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/AndroidManifest.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/AndroidManifest.xml
new file mode 100644
index 0000000..7795c0b
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.car.resources.md_emulator.osdouble">
+ <application android:hasCode="false"/>
+ <!-- priority should be higher than CarServiceOverlayEmulatorOsDouble -->
+ <overlay android:priority="5002"
+ android:targetPackage="com.android.car.updatable"
+ android:targetName="CarServiceCustomization"
+ android:resourcesMap="@xml/overlays"
+ android:isStatic="true" />
+</manifest>
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml
new file mode 100644
index 0000000..d88c016
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<!-- Resources to configure car service based on each OEM's preference. -->
+<resources>
+ <!--
+ Lists all occupant (= driver + passenger) zones available in the car.
+ Some examples are:
+ <item>occupantZoneId=0,occupantType=DRIVER,seatRow=1,seatSide=driver</item>
+ <item>occupantZoneId=1,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=oppositeDriver</item>
+ <item>occupantZoneId=2,occupantType=REAR_PASSENGER,seatRow=2,seatSide=left</item>
+ <item>occupantZoneId=3,occupantType=REAR_PASSENGER,seatRow=2,seatSide=right</item>
+
+ occupantZoneId: Unique unsigned integer id to represent each passenger zone. Each zone
+ should have different id.
+ occupantType: Occupant type for the display. Use * part from
+ CarOccupantZoneManager.OCCUPANT_TYPE_* like DRIVER, FRONT_PASSENGER,
+ REAR_PASSENGER and etc.
+ seatRow: Integer telling which row the seat is located. Row 1 is for front seats.
+ seatSide: left/center/right for known side. Or can use driver/center/oppositeDriver to
+ handle both right-hand driving and left-hand driving in one place.
+ If car's RHD / LHD is not specified, LHD will be assumed and driver side becomes
+ left.
+ -->
+ <string-array translatable="false" name="config_occupant_zones">
+ <item>occupantZoneId=0,occupantType=DRIVER,seatRow=1,seatSide=driver</item>
+ <item>occupantZoneId=1,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=oppositeDriver</item>
+ <item>occupantZoneId=2,occupantType=REAR_PASSENGER,seatRow=2,seatSide=left</item>
+ <item>occupantZoneId=3,occupantType=REAR_PASSENGER,seatRow=2,seatSide=right</item>
+ </string-array>
+
+ <!--
+ Specifies configuration of displays in system telling its usage / type and assigned
+ occupant.
+
+ Some examples are:
+ <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>
+ <item>displayPort=2,displayType=MAIN,occupantZoneId=1,inputTypes=TOUCH_SCREEN</item>
+ <item>displayPort=3,displayType=MAIN,occupantZoneId=2,inputTypes=TOUCH_SCREEN</item>
+ <item>displayPort=4,displayType=MAIN,occupantZoneId=3,inputTypes=TOUCH_SCREEN</item>
+
+ displayPort: Unique port id for the display.
+ 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>displayUniqueId=virtual:com.android.car.cluster.osdouble:ClusterDisplay,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>displayPort=4,displayType=MAIN,occupantZoneId=3,inputTypes=TOUCH_SCREEN</item>
+ </string-array>
+
+ <!--
+ Specifies optional features that can be enabled by this image. Note that vhal can disable
+ them depending on product variation.
+ Feature name can be either service name defined in Car.*_SERVICE for Car*Manager or any
+ optional feature defined under @OptionalFeature annotation.
+ Note that '/' is used to have subfeature under main feature like "MAIN_FEATURE/SUB_FEATURE".
+
+ Some examples are:
+ <item>storage_monitoring</item>
+ <item>com.android.car.user.CarUserNoticeService</item>
+ <item>com.example.Feature/SubFeature</item>
+
+ The default list defined below will enable all optional features defined.
+ -->
+ <string-array translatable="false" name="config_allowed_optional_car_features">
+ <item>car_evs_service</item>
+ <item>car_navigation_service</item>
+ <item>car_occupant_connection_service</item>
+ <item>car_remote_device_service</item>
+ <item>cluster_home_service</item>
+ <item>com.android.car.user.CarUserNoticeService</item>
+ <item>diagnostic</item>
+ <item>storage_monitoring</item>
+ <item>vehicle_map_service</item>
+ <item>car_telemetry_service</item>
+ </string-array>
+
+ <!-- Enable profile user assignment per each CarOccupantZone for per display android user
+ assignments. This feature is still experimental. -->
+ <bool name="enableProfileUserAssignmentForMultiDisplay" translatable="false">true</bool>
+</resources>
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/car_ux_restrictions_map.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/car_ux_restrictions_map.xml
new file mode 100644
index 0000000..018c3fe
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/car_ux_restrictions_map.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<UxRestrictions xmlns:car="http://schemas.android.com/apk/res-auto">
+ <!-- Map the driving states to UX restrictions here -->
+ <!-- Note - The platform takes a fully restricted approach when there is no information or if
+ the information is malformed. As a result,
+ 1. Default values for requiresDistractionOptimization is true, and uxr is fully_restricted.
+ 2. If uxr != baseline, then requiresDistractionOptimization is automatically promoted to true,
+ even if it is declared as false. Because it doesn't make sense to have an non baseline UX
+ restriction without requiresDistractionOptimization set to true.
+ So if we don't want any restrictions, requiresDistractionOptimization should be explicitly
+ marked as false and uxr should be explicitly set to baseline. -->
+
+ <RestrictionMapping physicalPort="0">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline" mode="baseline"/>
+ </DrivingState>
+
+ <!-- This is restrictions for moving and speed [0,5m/s) -->
+ <DrivingState state="moving" minSpeed="0" maxSpeed="5.0">
+ <Restrictions requiresDistractionOptimization="true" uxr="no_dialpad|no_filtering|limit_string_length|no_keyboard|no_video|limit_content|no_setup|no_text_message"/>
+ </DrivingState>
+
+ <!-- Restrictions for speed >=5 -->
+ <DrivingState state="moving" minSpeed="5.0">
+ <Restrictions requiresDistractionOptimization="true" uxr="no_dialpad|no_filtering|limit_string_length|no_keyboard|no_video|limit_content|no_setup|no_text_message"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <!--Setting baseline restrictions for all passenger displays -->
+ <RestrictionMapping physicalPort="2">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="moving">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <RestrictionMapping physicalPort="3">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="moving">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <RestrictionMapping physicalPort="4">
+ <DrivingState state="parked">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="idling">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ <DrivingState state="moving">
+ <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
+ </DrivingState>
+
+ </RestrictionMapping>
+
+ <!-- Configure restriction parameters here-->
+ <RestrictionParameters>
+ <!-- Parameters to express displayed String related restrictions -->
+ <!-- Max allowed length of general purpose strings when limit_string_length is imposed-->
+ <StringRestrictions maxLength="120"/>
+ <!-- Parameters to express content related restrictions -->
+ <!-- Max number of cumulative content items allowed to be displayed when
+ limit_content is imposed. -->
+ <!-- Maximum levels deep that the user can navigate to when limit_content is imposed. -->
+ <ContentRestrictions maxCumulativeItems="21" maxDepth="3"/>
+ </RestrictionParameters>
+
+</UxRestrictions>
+
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/overlays.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/overlays.xml
new file mode 100644
index 0000000..290c9db
--- /dev/null
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/xml/overlays.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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.
+ -->
+<overlay>
+ <item target="array/config_occupant_zones" value="@array/config_occupant_zones" />
+ <item target="array/config_occupant_display_mapping" value="@array/config_occupant_display_mapping" />
+ <item target="array/config_allowed_optional_car_features" value="@array/config_allowed_optional_car_features" />
+ <item target="bool/enableProfileUserAssignmentForMultiDisplay" value="@bool/enableProfileUserAssignmentForMultiDisplay" />
+ <item target="xml/car_ux_restrictions_map" value="@xml/car_ux_restrictions_map" />
+</overlay>
diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_OsDouble/res/values/config.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_OsDouble/res/values/config.xml
index 08ecf4b..ca59963 100644
--- a/emulator/cluster/rro_overlays/CarServiceOverlay_OsDouble/res/values/config.xml
+++ b/emulator/cluster/rro_overlays/CarServiceOverlay_OsDouble/res/values/config.xml
@@ -24,22 +24,22 @@
occupant.
Some examples are:
- <item>displayPort=0,displayType=MAIN,occupantZoneId=0</item>
- <item>displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0</item>
- <item>displayPort=2,displayType=MAIN,occupantZoneId=1</item>
- <item>displayPort=3,displayType=MAIN,occupantZoneId=2</item>
- <item>displayPort=4,displayType=MAIN,occupantZoneId=3</item>
+ <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>
+ <item>displayPort=2,displayType=MAIN,occupantZoneId=1,inputTypes=TOUCH_SCREEN</item>
+ <item>displayPort=3,displayType=MAIN,occupantZoneId=2,inputTypes=TOUCH_SCREEN</item>
+ <item>displayPort=4,displayType=MAIN,occupantZoneId=3,inputTypes=TOUCH_SCREEN</item>
displayPort: Unique port id for the display.
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</item>
- <item>displayUniqueId=virtual:com.android.car.cluster.osdouble:ClusterDisplay,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0</item>
+ <item>displayPort=0,displayType=MAIN,occupantZoneId=0,inputTypes=TOUCH_SCREEN|DPAD_KEYS|NAVIGATE_KEYS|ROTARY_NAVIGATION</item>
+ <item>displayUniqueId=virtual:com.android.car.cluster.osdouble:ClusterDisplay,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0,inputTypes=DPAD_KEYS</item>
</string-array>
<!--
@@ -57,8 +57,8 @@
The default list defined below will enable all optional features defined.
-->
<!-- Override cluster_service with cluster_home_service. -->
- <!-- TODO(b/205908527): this overlay is to temporarily disable CarEvsService by default. -->
<string-array translatable="false" name="config_allowed_optional_car_features">
+ <item>car_evs_service</item>
<item>car_navigation_service</item>
<item>cluster_home_service</item>
<item>com.android.car.user.CarUserNoticeService</item>