Keep methods annotated with @JavascriptInterface

This rule is a common default rule elsewhere, and should be applied
globally for platform targets rather than relying on per-target rules.

Follow-up work will remove duplicated rules from individual targets.

Bug: 248580093
Test: m
Change-Id: If3cb9fb22d2acf90d87f150f93ad491549bf9090
This commit is contained in:
Jared Duke
2023-03-28 14:09:31 -07:00
parent 1f5aa11437
commit cc28b02f77

View File

@@ -41,6 +41,11 @@
java.lang.Object readResolve();
}
# Keep all Javascript API methods
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
# Keep Throwable's constructor that takes a String argument.
-keepclassmembers class * extends java.lang.Throwable {
<init>(java.lang.String);