Snap for 6088402 from e46ace45a4ed83f469ac06cdf7cdab3fe1e89b7d to qt-d4-release

Change-Id: I205d2c79af4f826089549bb9921c699e691607b7
diff --git a/car_x86_64.mk b/car_x86_64.mk
index c5712e4..476bb50 100644
--- a/car_x86_64.mk
+++ b/car_x86_64.mk
@@ -15,6 +15,17 @@
 
 $(call inherit-product, device/generic/car/common/car.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_x86_64.mk)
+$(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk)
+
+PRODUCT_SDK_ADDON_NAME := car_emu_x86_64
+
+# Extra files needed by the addon.
+PRODUCT_SDK_ADDON_COPY_FILES := \
+    device/generic/goldfish/data/etc/encryptionkey.img:images/${TARGET_CPU_ABI}/encryptionkey.img\
+    device/generic/car/car_x86_64/manifest.ini:manifest.ini
+
+PRODUCT_SDK_ADDON_COPY_MODULES := \
+    com.android.future.usb.accessory:libs/usb.jar
 
 DEVICE_PACKAGE_OVERLAYS += device/generic/car/car_x86_64/overlay
 
@@ -22,3 +33,7 @@
 PRODUCT_DEVICE := generic_x86_64
 PRODUCT_BRAND := Google
 PRODUCT_MODEL := Car on x86_64 emulator
+PRODUCT_SDK_ADDON_NAME := car_x86_64
+
+PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \
+    device/generic/car/car_x86_64/source.properties
diff --git a/car_x86_64/manifest.ini b/car_x86_64/manifest.ini
new file mode 100644
index 0000000..54b62d1
--- /dev/null
+++ b/car_x86_64/manifest.ini
@@ -0,0 +1,14 @@
+# SDK Add-on Manifest
+
+name=Android emu
+name-id=Android
+vendor=Google Inc
+vendor-id=google
+description=Android
+
+# version of the Android platform on which this add-on is built.
+api=29
+
+# revision of the add-on
+revision=1
+
diff --git a/car_x86_64/source.properties b/car_x86_64/source.properties
new file mode 100644
index 0000000..ee20de5
--- /dev/null
+++ b/car_x86_64/source.properties
@@ -0,0 +1,12 @@
+Pkg.Desc=System Image x86_64.
+Pkg.Revision=5
+Pkg.Dependencies=emulator#27.1.7
+AndroidVersion.ApiLevel=29
+SystemImage.Abi=x86_64
+SystemImage.TagId=google_apis
+SystemImage.TagDisplay=Android emu
+SystemImage.GpuSupport=true
+Addon.VendorId=Android
+Addon.VendorDisplay=Android
+avd_config_ini.hw.mainKeys=no
+avd_config_ini.hw.keyboard=yes
diff --git a/common/car.mk b/common/car.mk
index de0250a..8b65a31 100644
--- a/common/car.mk
+++ b/common/car.mk
@@ -32,9 +32,14 @@
     packages/services/Car/car_product/init/init.car.rc:root/init.car.rc
 
 # Copy car_core_hardware and overwrite handheld_core_hardware.xml with a dummy config.
+# Overwrite goldfish related xml with a dummy config.
 PRODUCT_COPY_FILES += \
     device/generic/car/common/android.hardware.dummy.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
-    device/generic/car/common/car_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_core_hardware.xml
+    device/generic/car/common/car_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_core_hardware.xml \
+    device/generic/car/common/android.hardware.dummy.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.ar.xml \
+    device/generic/car/common/android.hardware.dummy.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml \
+    device/generic/car/common/android.hardware.dummy.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
+    device/generic/car/common/android.hardware.dummy.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \
 
 # Enable landscape
 PRODUCT_COPY_FILES += \