keep androidx fragment through proguard optimization
Bug: 146432215
Test: on android master, apply the proguard config, build and flash and
verifies crash no longer occurs
Change-Id: Ie967bcbd33bfbc1b8ec088c55829760145f7b597
diff --git a/proguard.flags b/proguard.flags
index 272ab7a..3e12283 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -23,7 +23,10 @@
# support jar.
-keep class androidx.recyclerview.widget.RecyclerView { *; }
-# Preference fragments
+# Fragments
+-keep class ** extends androidx.fragment.app.Fragment {
+ public <init>(...);
+}
-keep class ** extends android.app.Fragment {
public <init>(...);
}
@@ -50,4 +53,4 @@
-dontwarn android.app.**
-dontwarn android.view.**
-dontwarn android.os.**
--dontwarn android.graphics.**
\ No newline at end of file
+-dontwarn android.graphics.**