m5: Properly overlay Bluetooth apex
authorBruno Martins <bgcngm@gmail.com>
Fri, 27 Oct 2023 12:11:54 +0000 (13:11 +0100)
committerNolen Johnson <johnsonnolen@gmail.com>
Sat, 28 Oct 2023 18:54:55 +0000 (14:54 -0400)
Change-Id: I87c4f1136fd68490bd55bda4033f36988cbd57f1

device.mk
overlay/packages/apps/Bluetooth/res/values/config.xml [deleted file]
rro_overlays/BluetoothOverlay/Android.bp [new file with mode: 0644]
rro_overlays/BluetoothOverlay/AndroidManifest.xml [new file with mode: 0644]
rro_overlays/BluetoothOverlay/res/values/config.xml [new file with mode: 0644]

index 591f4e0bfdc9acfccfb77afcfe52b494d5d1bb9e..5dd4994f5abbc30ecdb82cc6dfa5a0197a0839d1 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -8,6 +8,9 @@
 BOARD_HAVE_BLUETOOTH_RTK_TV := true
 include hardware/realtek/rtkbt/rtkbt.mk
 
+PRODUCT_PACKAGES += \
+    BananaPiM5BluetoothOverlay
+
 ## Factory
 PRODUCT_HOST_PACKAGES += \
     aml_image_packer
@@ -21,10 +24,6 @@ PRODUCT_PACKAGES += \
     8822cs \
     rtk_btusb
 
-## Overlays
-DEVICE_PACKAGE_OVERLAYS += \
-    $(LOCAL_PATH)/overlay
-
 ## TEE
 TARGET_HAS_TEE := false
 
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
deleted file mode 100644 (file)
index 7df2fca..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<resources>
-    <bool name="profile_supported_avrcp_controller">false</bool>
-    <bool name="profile_supported_a2dp_sink">false</bool>
-    <bool name="profile_supported_hs_hfp">false</bool>
-    <bool name="profile_supported_pbap">false</bool>
-    <bool name="profile_supported_hdp">false</bool>
-    <bool name="profile_supported_opp">false</bool>
-    <bool name="enable_phone_policy">false</bool>
-
-    <bool name="profile_supported_hfpclient">false</bool>
-    <bool name="hfp_client_connection_service_enabled">false</bool>
-    <bool name="profile_supported_pbapclient">false</bool>
-    <bool name="profile_supported_pan">false</bool>
-    <bool name="profile_supported_mapmce">false</bool>
-
-    <bool name="profile_supported_hid_host">true</bool>
-    <bool name="profile_supported_hid_device">true</bool>
-    <bool name="profile_supported_avrcp_target">true</bool>
-    <bool name="profile_supported_a2dp">true</bool>
-    <bool name="profile_supported_gatt">true</bool>
-    <bool name="profile_supported_map">true</bool>
-</resources>
diff --git a/rro_overlays/BluetoothOverlay/Android.bp b/rro_overlays/BluetoothOverlay/Android.bp
new file mode 100644 (file)
index 0000000..4add0ea
--- /dev/null
@@ -0,0 +1,11 @@
+//
+// Copyright (C) 2023 The LineageOS Project
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+runtime_resource_overlay {
+    name: "BananaPiM5BluetoothOverlay",
+    resource_dirs: ["res"],
+    sdk_version: "current",
+    proprietary: true
+}
diff --git a/rro_overlays/BluetoothOverlay/AndroidManifest.xml b/rro_overlays/BluetoothOverlay/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..9e3f249
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2023 The LineageOS Project
+
+     SPDX-License-Identifier: Apache-2.0
+-->
+<!-- Device specific bluetooth overlays -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.bluetooth.m5"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <application android:hasCode="false" />
+    <overlay
+      android:targetPackage="com.android.bluetooth"
+      android:isStatic="true"
+      android:priority="0"/>
+</manifest>
diff --git a/rro_overlays/BluetoothOverlay/res/values/config.xml b/rro_overlays/BluetoothOverlay/res/values/config.xml
new file mode 100644 (file)
index 0000000..7df2fca
--- /dev/null
@@ -0,0 +1,22 @@
+<resources>
+    <bool name="profile_supported_avrcp_controller">false</bool>
+    <bool name="profile_supported_a2dp_sink">false</bool>
+    <bool name="profile_supported_hs_hfp">false</bool>
+    <bool name="profile_supported_pbap">false</bool>
+    <bool name="profile_supported_hdp">false</bool>
+    <bool name="profile_supported_opp">false</bool>
+    <bool name="enable_phone_policy">false</bool>
+
+    <bool name="profile_supported_hfpclient">false</bool>
+    <bool name="hfp_client_connection_service_enabled">false</bool>
+    <bool name="profile_supported_pbapclient">false</bool>
+    <bool name="profile_supported_pan">false</bool>
+    <bool name="profile_supported_mapmce">false</bool>
+
+    <bool name="profile_supported_hid_host">true</bool>
+    <bool name="profile_supported_hid_device">true</bool>
+    <bool name="profile_supported_avrcp_target">true</bool>
+    <bool name="profile_supported_a2dp">true</bool>
+    <bool name="profile_supported_gatt">true</bool>
+    <bool name="profile_supported_map">true</bool>
+</resources>