Selaa lähdekoodia

Add GmsSettingsOverlay

This gives GMS access to manage the Bluetooth devices
slice to show useful information for Fast Pair devices,
like Pixel Buds.

By default this configs are not set in LineageOS and in AOSP,
so set them to Google's value extracted from SettingsGoogle of
akita 14 AP2A.240905.003.E1.
Fede2782 5 kuukautta sitten
vanhempi
sitoutus
8c0c450114

+ 1 - 1
common/common-vendor.mk

@@ -36,4 +36,4 @@ PRODUCT_PACKAGES += \
 endif
 
 PRODUCT_SOONG_NAMESPACES += vendor/gapps/overlay
-PRODUCT_PACKAGES += GmsOverlay GmsSettingsProviderOverlay GmsSetupWizardOverlay
+PRODUCT_PACKAGES += GmsOverlay GmsSettingsOverlay GmsSettingsProviderOverlay GmsSetupWizardOverlay

+ 4 - 0
overlay/GmsSettingsOverlay/Android.bp

@@ -0,0 +1,4 @@
+runtime_resource_overlay {
+    name: "GmsSettingsOverlay",
+    product_specific: true
+}

+ 7 - 0
overlay/GmsSettingsOverlay/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.mtg.gmssettingsoverlay"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <application android:hasCode="false" />
+    <overlay android:targetPackage="com.android.settings" android:priority="1337" android:isStatic="true" />
+</manifest>

+ 23 - 0
overlay/GmsSettingsOverlay/apktool.yml

@@ -0,0 +1,23 @@
+!!brut.androlib.apk.ApkInfo
+apkFileName: GmsSettingsOverlay.apk
+doNotCompress:
+- resources.arsc
+isFrameworkApk: false
+packageInfo:
+  forcedPackageId: '127'
+  renameManifestPackage: null
+resourcesAreCompressed: false
+sdkInfo:
+  minSdkVersion: '34'
+  targetSdkVersion: '34'
+sharedLibrary: false
+sparseResources: true
+unknownFiles: {}
+usesFramework:
+  ids:
+  - 1
+  tag: null
+version: 2.8.1
+versionInfo:
+  versionCode: '1'
+  versionName: '1.0'

+ 14 - 0
overlay/GmsSettingsOverlay/res/values/config.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- BT Slice EXTRA_INTENT. To support Settings 2 panel, BT slice can't use PendingIntent.send(). Therefore, here defines the Slice EXTRA_INTENT. -->
+    <string name="config_bt_slice_extra_intent" translatable="false">com.google.android.gms.nearby.discovery.EXTRA_INTENT</string>
+
+    <!-- BT Slice EXTRA_PENDING_INTENT. To support Settings 2 panel, BT slice can't use PendingIntent.send(). Therefore, here defines the Slice EXTRA_PENDING_INTENT. -->
+    <string name="config_bt_slice_extra_pending_intent" translatable="false">com.google.android.gms.nearby.discovery.EXTRA_PENDING_INTENT</string>
+
+    <!-- BT Slice intent action. To support Settings 2 panel, BT slice can't use PendingIntent.send(). Therefore, here defines the Slice intent action. -->
+    <string name="config_bt_slice_intent_action" translatable="false">com.google.android.gms.nearby.discovery.ACTION_LOG_SLICE_AND_LAUNCH_INTENT</string>
+
+    <!-- BT Slice pending intent action. To support Settings 2 panel, BT slice can't use PendingIntent.send(). Therefore, here defines the Slice pending intent action. -->
+    <string name="config_bt_slice_pending_intent_action" translatable="false">com.google.android.gms.nearby.discovery.ACTION_LOG_SLICE_AND_SEND_PENDING_INTENT</string>
+</resources>