Import the window extension libary in the Settings app
Test: Rebuilt apk and run apk successfully.
Bug: 196939216
Change-Id: If9040ae9a1c72097e4964c8d40ea9785cf2f01dc
diff --git a/Android.bp b/Android.bp
index 24fc7e8..9171012 100644
--- a/Android.bp
+++ b/Android.bp
@@ -74,6 +74,7 @@
"android.hardware.dumpstate-V1.1-java",
"lottie",
"WifiTrackerLib",
+ "windowExtLib",
],
libs: [
@@ -102,6 +103,10 @@
],
static_libs: ["Settings-core"],
uses_libs: ["org.apache.http.legacy"],
+ optional_uses_libs: [
+ "androidx.window.extensions",
+ "androidx.window.sidecar",
+ ],
resource_dirs: [],
optimize: {
proguard_flags_files: ["proguard.flags"],
@@ -113,6 +118,11 @@
aars: ["libs/contextualcards.aar"],
}
+android_library_import {
+ name: "windowExtLib",
+ aars: ["libs/window_ext_lib.aar"],
+}
+
filegroup {
name: "Settings_proguard_flags",
srcs: ["proguard.flags"],
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 426aebf..8fb49cb 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -122,6 +122,7 @@
android:appComponentFactory="androidx.core.app.CoreComponentFactory">
<uses-library android:name="org.apache.http.legacy" />
+
<!-- Settings -->
<activity android:name=".homepage.SettingsHomepageActivity"
diff --git a/libs/window_ext_lib.aar b/libs/window_ext_lib.aar
new file mode 100644
index 0000000..b1a9511
--- /dev/null
+++ b/libs/window_ext_lib.aar
Binary files differ
diff --git a/proguard.flags b/proguard.flags
index b66a786..5482f1c 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -66,3 +66,8 @@
-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker {
public <init>(android.content.Context, android.net.Uri);
}
+
+# Keep WM Jetpack classes and callbacks
+-keep class androidx.window.extensions.** { *; }
+-dontwarn androidx.window.extensions.**
+-keep class androidx.window.** { *; }