sabrina: 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 17:27:51 +0000 (18:27 +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 8ad2b0641b18b771d45a02d45bc226172c6fa3de..088687c9560e26f25cbc4e8509987e9a0927c837 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -1,11 +1,12 @@
 #
-# Copyright (C) 2021-2022 The LineageOS Project
+# Copyright (C) 2021-2023 The LineageOS Project
 #
 # SPDX-License-Identifier: Apache-2.0
 #
 
 ## Bluetooth
 PRODUCT_PACKAGES += \
+    SabrinaBluetoothOverlay \
     libbt-vendor
 
 ## Init-Files
@@ -19,10 +20,6 @@ PRODUCT_COPY_FILES += \
 PRODUCT_PACKAGES += \
     dhd
 
-## Overlays
-DEVICE_PACKAGE_OVERLAYS += \
-    $(LOCAL_PATH)/overlay
-
 ## Wi-Fi
 TARGET_DHD_VERSION := bcmdhd.100.10.545.x
 
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 acd4fcf..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2021 The LineageOS Project
-
-     SPDX-License-Identifier: Apache-2.0
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <bool name="enable_phone_policy">true</bool>
-    <bool name="pbap_include_photos_in_vcard">false</bool>
-    <bool name="pbap_use_profile_for_owner_vcard">false</bool>
-    <bool name="profile_supported_hdp">false</bool>
-    <bool name="profile_supported_hs_hfp">false</bool>
-    <bool name="profile_supported_map">false</bool>
-    <bool name="profile_supported_opp">false</bool>
-    <bool name="profile_supported_pan">false</bool>
-    <bool name="profile_supported_pbap">false</bool>
-</resources>
diff --git a/rro_overlays/BluetoothOverlay/Android.bp b/rro_overlays/BluetoothOverlay/Android.bp
new file mode 100644 (file)
index 0000000..63102c6
--- /dev/null
@@ -0,0 +1,11 @@
+//
+// Copyright (C) 2023 The LineageOS Project
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+runtime_resource_overlay {
+    name: "SabrinaBluetoothOverlay",
+    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..334895a
--- /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.sabrina"
+    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..acd4fcf
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 The LineageOS Project
+
+     SPDX-License-Identifier: Apache-2.0
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <bool name="enable_phone_policy">true</bool>
+    <bool name="pbap_include_photos_in_vcard">false</bool>
+    <bool name="pbap_use_profile_for_owner_vcard">false</bool>
+    <bool name="profile_supported_hdp">false</bool>
+    <bool name="profile_supported_hs_hfp">false</bool>
+    <bool name="profile_supported_map">false</bool>
+    <bool name="profile_supported_opp">false</bool>
+    <bool name="profile_supported_pan">false</bool>
+    <bool name="profile_supported_pbap">false</bool>
+</resources>