Snap for 7316203 from ed6b897221779aa8c520ad3db271b0ff71007b4f to rvc-platform-release

Change-Id: I0c74ec91cce783200f2e4ce8300baf22786ae608
diff --git a/shared/BoardConfig.mk b/shared/BoardConfig.mk
index 7c5f6ed..76b25b7 100644
--- a/shared/BoardConfig.mk
+++ b/shared/BoardConfig.mk
@@ -69,8 +69,8 @@
 # The compiler will occasionally generate movaps, etc.
 BOARD_MALLOC_ALIGNMENT := 16
 
-# Make the userdata partition 4.25G to accomodate ASAN and CTS
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 4563402752
+# Make the userdata partition 6G to accommodate ASAN and CTS
+BOARD_USERDATAIMAGE_PARTITION_SIZE := $(TARGET_USERDATAIMAGE_PARTITION_SIZE)
 TARGET_USERIMAGES_SPARSE_F2FS_DISABLED := true
 BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := $(TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE)
 TARGET_USERIMAGES_USE_F2FS := true
diff --git a/shared/auto/device.mk b/shared/auto/device.mk
index dbe984c..5248836 100644
--- a/shared/auto/device.mk
+++ b/shared/auto/device.mk
@@ -39,6 +39,7 @@
 endif
 
 PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
     frameworks/native/data/etc/android.hardware.broadcastradio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.broadcastradio.xml \
     frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \
     frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml \
diff --git a/shared/config/manifest.xml b/shared/config/manifest.xml
index 0e500d2..0ba25da 100644
--- a/shared/config/manifest.xml
+++ b/shared/config/manifest.xml
@@ -68,15 +68,6 @@
     </hal>
     -->
     <hal format="hidl">
-        <name>android.hardware.bluetooth</name>
-        <transport>hwbinder</transport>
-        <version>1.1</version>
-        <interface>
-            <name>IBluetoothHci</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
-    <hal format="hidl">
         <name>android.hardware.bluetooth.audio</name>
         <transport>hwbinder</transport>
         <version>2.0</version>
diff --git a/shared/config/manifest_android.hardware.bluetooth@1.1-service.xml b/shared/config/manifest_android.hardware.bluetooth@1.1-service.xml
new file mode 100644
index 0000000..4d70779
--- /dev/null
+++ b/shared/config/manifest_android.hardware.bluetooth@1.1-service.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2021, 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 version="1.0" type="device">
+    <hal format="hidl">
+        <name>android.hardware.bluetooth</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>IBluetoothHci</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+</manifest>
diff --git a/shared/device.mk b/shared/device.mk
index 72e27d7..31b5196 100644
--- a/shared/device.mk
+++ b/shared/device.mk
@@ -31,6 +31,7 @@
 PRODUCT_SOONG_NAMESPACES += device/generic/goldfish-opengl # for vulkan
 
 TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE ?= f2fs
+TARGET_USERDATAIMAGE_PARTITION_SIZE ?= 6442450944
 
 TARGET_VULKAN_SUPPORT ?= true
 
@@ -271,9 +272,15 @@
 #
 # Bluetooth HAL and Compatibility Bluetooth library (for older revs).
 #
-PRODUCT_PACKAGES += \
-    android.hardware.bluetooth@1.1-service.sim \
-    android.hardware.bluetooth.audio@2.0-impl
+ifeq ($(LOCAL_BLUETOOTH_PRODUCT_PACKAGE),)
+    LOCAL_BLUETOOTH_PRODUCT_PACKAGE := \
+        android.hardware.bluetooth@1.1-service.sim
+    DEVICE_MANIFEST_FILE +=  device/google/cuttlefish/shared/config/manifest_android.hardware.bluetooth@1.1-service.xml
+endif
+
+PRODUCT_PACKAGES += $(LOCAL_BLUETOOTH_PRODUCT_PACKAGE)
+
+PRODUCT_PACKAGES += android.hardware.bluetooth.audio@2.0-impl
 
 #
 # Audio HAL