1#
2# Copyright (C) 2022 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# Add non-removable cluster by creating a display on hwservicemanager.
17PRODUCT_COPY_FILES += \
18    device/generic/car/emulator/cluster/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml \
19
20ifeq ($(EMULATOR_MULTIDISPLAY_HW_CONFIG),)
21PRODUCT_PRODUCT_PROPERTIES += \
22    hwservicemanager.external.displays=1,400,600,120,0 \
23    persist.service.bootanim.displays=8140900251843329
24else
25ifneq ($(EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG),)
26    PRODUCT_PRODUCT_PROPERTIES += \
27        hwservicemanager.external.displays=$(EMULATOR_MULTIDISPLAY_HW_CONFIG) \
28        persist.service.bootanim.displays=$(EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG)
29else #  EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG
30$(error EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG has to be defined when EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG is defined)
31endif # EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG
32endif # EMULATOR_HW_MULTIDISPLAY_CONFIG
33
34ifeq (true,$(ENABLE_CLUSTER_OS_DOUBLE))
35PRODUCT_PACKAGES += ClusterHomeSampleOverlay CarServiceOverlayEmulatorOsDouble ClusterOsDoubleEmulatorPhysicalDisplayOverlay
36else
37PRODUCT_PACKAGES += CarServiceOverlayEmulator
38endif  # ENABLE_CLUSTER_OS_DOUBLE
39
40# Disable dynamic multidisplay for emulators with display added by
41# hwservicemanager.
42EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG := false
43
44