Keep ActionCallback constructors so widget taps work in release

Glance instantiates ActionCallback implementations reflectively, but its
consumer rule only keeps the class, not its members. R8 stripped the no-arg
constructor, so every widget tap threw NoSuchMethodException in minified
builds.
This commit is contained in:
Adam Brown 2026-08-21 23:25:05 -07:00
parent 893e29106d
commit a6a17fb1e4

View file

@ -54,4 +54,11 @@
-assumenosideeffects class org.slf4j.Logger {
public void trace(...);
public void debug(...);
}
}
# Glance instantiates ActionCallback implementations reflectively via their no-arg
# constructor. Glance's own consumer rule keeps the class but not its members, so
# R8 strips the constructor and every widget tap throws NoSuchMethodException.
-keepclassmembers class * implements androidx.glance.appwidget.action.ActionCallback {
<init>();
}