Add overlays
* Use a high priority to override other rro overlays
This commit is contained in:
2
overlay/Android.bp
Normal file
2
overlay/Android.bp
Normal file
@@ -0,0 +1,2 @@
|
||||
soong_namespace {
|
||||
}
|
4
overlay/GmsOverlay/Android.bp
Normal file
4
overlay/GmsOverlay/Android.bp
Normal file
@@ -0,0 +1,4 @@
|
||||
runtime_resource_overlay {
|
||||
name: "GmsOverlay",
|
||||
product_specific: true
|
||||
}
|
6
overlay/GmsOverlay/AndroidManifest.xml
Normal file
6
overlay/GmsOverlay/AndroidManifest.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mtg.gmsoverlay"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<overlay android:targetPackage="android" android:priority="1337" android:isStatic="true" />
|
||||
</manifest>
|
40
overlay/GmsOverlay/res/values/config.xml
Normal file
40
overlay/GmsOverlay/res/values/config.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- Default service to enable with accessibility shortcut [DO NOT TRANSLATE] -->
|
||||
<string name="config_defaultAccessibilityService" translatable="false">com.google.android.marvin.talkback/.TalkBackService</string>
|
||||
|
||||
<!-- The name of the package that will hold the speech recognizer role by default. -->
|
||||
<string name="config_systemSpeechRecognizer" translatable="false">com.google.android.tts</string>
|
||||
|
||||
<!-- The name of the package that will hold the wellbeing role. -->
|
||||
<string name="config_systemWellbeing" translatable="false">com.google.android.apps.wellbeing</string>
|
||||
|
||||
<!-- The package name for the default wellbeing application. [DO NOT TRANSLATE] -->
|
||||
<string name="config_defaultWellbeingPackage" translatable="false">com.google.android.apps.wellbeing</string>
|
||||
|
||||
<!-- An array of packages that can make sound on the ringer stream in priority-only DND mode -->
|
||||
<string-array name="config_priorityOnlyDndExemptPackages" translatable="false">
|
||||
<item>com.android.dialer</item>
|
||||
<item>com.google.android.dialer</item>
|
||||
<item>com.android.server.telecom</item>
|
||||
<item>android</item>
|
||||
<item>com.android.systemui</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Colon separated list of package names that should be granted DND access -->
|
||||
<string name="config_defaultDndAccessPackages" translatable="false">com.google.android.gms:com.google.android.apps.wellbeing</string>
|
||||
|
||||
<!-- Names of packages that should not be suspended when personal use is blocked by policy. -->
|
||||
<string-array name="config_packagesExemptFromSuspension" translatable="false">
|
||||
<item>com.google.android.apps.wellbeing</item>
|
||||
</string-array>
|
||||
|
||||
<!-- List containing the allowed install sources for accessibility service. -->
|
||||
<string-array name="config_accessibility_allowed_install_source" translatable="false">
|
||||
<item>com.android.vending</item>
|
||||
</string-array>
|
||||
|
||||
<!-- The names of the packages that will hold the system automotive projection role. -->
|
||||
<string name="config_systemAutomotiveProjection" translatable="false">com.google.android.projection.gearhead</string>
|
||||
|
||||
</resources>
|
27
overlay/build_overlays.sh
Executable file
27
overlay/build_overlays.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
GARCH=$1
|
||||
GOUT=$2
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
OVERLAYS=$(for dir in $(ls -d */); do echo ${dir%%/}; done)
|
||||
|
||||
croot 2>/dev/null || cd ../../../
|
||||
|
||||
source build/envsetup.sh
|
||||
breakfast gapps_$GARCH
|
||||
m installclean
|
||||
m $OVERLAYS | tee $OUT/.log
|
||||
|
||||
LOC="$(cat $OUT/.log | sed -r -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' -e 's/^\[ {0,2}[0-9]{1,3}% [0-9]{1,6}\/[0-9]{1,6}\] +//' \
|
||||
| grep '^Install: ' | cut -d ':' -f 2)"
|
||||
RELOUT=$(echo $OUT | sed "s#^${ANDROID_BUILD_TOP}/##")
|
||||
FILES=$(echo $LOC | tr " " "\n" | sed "s#.*${RELOUT}##" | sort | uniq)
|
||||
|
||||
for TARGET in $FILES; do
|
||||
mkdir -p $(dirname $GOUT/$TARGET) && cp $OUT/$TARGET $GOUT/$TARGET
|
||||
done
|
Reference in New Issue
Block a user