(SHIFT) Add GMS variant
Change-Id: Ib04a2cbb9abd5034c20fb4c2121956692f7beede
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/Android.bp b/Android.bp
index be6353d..8491ee7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -66,6 +66,18 @@
+ "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
}
+genrule {
+ name: "ThemePicker_res_overrides_gms",
+ tools: ["soong_zip"],
+ srcs: [
+ "res_override_gms/**/*",
+ ],
+ out: ["ThemePicker_res_overrides_gms.zip"],
+ cmd: "INPUTS=($(in)) && "
+ + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
+ + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
+}
+
java_defaults {
name: "ThemePicker_defaults",
@@ -96,8 +108,6 @@
use_embedded_native_libs: true,
- resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"],
-
optimize: {
enabled: false,
},
@@ -118,6 +128,7 @@
platform_apis: true,
manifest: "AndroidManifest.xml",
additional_manifests: [":WallpaperPicker2_Manifest"],
+ resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"],
overrides: [
"WallpaperCropper",
"WallpaperPicker",
@@ -128,6 +139,25 @@
],
}
+android_app {
+ name: "ThemePickerGms",
+ defaults: ["ThemePicker_defaults"],
+
+ platform_apis: true,
+ manifest: "AndroidManifest.xml",
+ additional_manifests: [":WallpaperPicker2_Manifest"],
+ resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides_gms"],
+ overrides: [
+ "ThemePicker",
+ "WallpaperCropper",
+ "WallpaperPicker",
+ "WallpaperPicker2",
+ ],
+ required: [
+ "privapp_whitelist_com.android.wallpaper"
+ ],
+}
+
prebuilt_etc {
name: "privapp_whitelist_com.android.wallpaper",
system_ext_specific: true,
diff --git a/res_override_gms/layout/theme_cover_qsb.xml b/res_override_gms/layout/theme_cover_qsb.xml
new file mode 100644
index 0000000..ac488e5
--- /dev/null
+++ b/res_override_gms/layout/theme_cover_qsb.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2019 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/theme_qsb"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="visible"/>
\ No newline at end of file
diff --git a/res_override_gms/values/override.xml b/res_override_gms/values/override.xml
new file mode 100644
index 0000000..05af982
--- /dev/null
+++ b/res_override_gms/values/override.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- Package of the stub apk containing the themes descriptions -->
+ <string name="themes_stub_package" translatable="false">
+ com.android.customization.themes
+ </string>
+
+ <!-- Package of the stub apk containing the clock content -->
+ <string name="clocks_stub_package" translatable="false"/>
+
+ <!-- Authority of a System UI provider that provides preview info for available clockfaces. -->
+ <string name="clocks_provider_authority" translatable="false">
+ com.android.keyguard.clock
+ </string>
+
+ <string name="launcher_overlayable_package" translatable="false">com.android.launcher3</string>
+
+ <!-- List of packages whose icons are used to preview the icon shape for a theme. These are
+ typically GMS apps so they should be available in GMS devices. -->
+ <array name="icon_shape_preview_packages">
+ <item>com.google.android.gm</item>
+ <item>com.google.android.googlequicksearchbox</item>
+ <item>com.google.android.apps.photos</item>
+ <item>com.google.android.apps.docs</item>
+ <item>com.google.android.youtube</item>
+ <item>com.android.vending</item>
+ </array>
+</resources>