dopinder: Properly overlay Bluetooth apex
authorBruno Martins <bgcngm@gmail.com>
Fri, 27 Oct 2023 12:11:54 +0000 (13:11 +0100)
committerBruno Martins <bgcngm@gmail.com>
Fri, 27 Oct 2023 19:44:38 +0000 (20:44 +0100)
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 94207e85fa65fcb794c24eaee871ecb886007959..da93c184c40f456f924088074f125b6d0111f5f5 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2021-2022 The LineageOS Project
+# Copyright (C) 2021-2023 The LineageOS Project
 #
 # SPDX-License-Identifier: Apache-2.0
 #
@@ -8,6 +8,9 @@
 BOARD_HAVE_BLUETOOTH_RTK_TV := true
 include hardware/realtek/rtkbt/rtkbt.mk
 
+PRODUCT_PACKAGES += \
+    DopinderBluetoothOverlay
+
 ## GMS
 ifeq ($(WITH_GMS),true)
 GMS_MAKEFILE=gms_minimal.mk
@@ -21,10 +24,6 @@ PRODUCT_COPY_FILES += \
 PRODUCT_PACKAGES += \
     8822cs
 
-## Overlays
-DEVICE_PACKAGE_OVERLAYS += \
-    $(LOCAL_PATH)/overlay
-
 ## Inherit from the common tree product makefile
 $(call inherit-product, device/amlogic/g12-common/g12.mk)
 
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..1e0ae37
--- /dev/null
@@ -0,0 +1,11 @@
+//
+// Copyright (C) 2023 The LineageOS Project
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+runtime_resource_overlay {
+    name: "DopinderBluetoothOverlay",
+    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..963847b
--- /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.dopinder"
+    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>