Files
swiftcontrol/android/app/proguard-rules.pro
Jonas Bark 55eba7ce4d fix(android): keep flutter_overlay_window OverlayService fields under R8
The release build is minified (R8), which renamed/removed the private
OverlayService fields (instance, flutterView, windowManager) that
OverlayActionBridge reaches by reflection to re-top the overlay and toggle
keep-screen-on. Both calls therefore threw NoSuchFieldException at runtime
("No field instance in ...OverlayService"). Add a proguard-rules.pro keep
rule for the service and wire proguardFiles into the release buildType.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-05 09:22:01 +02:00

8 lines
524 B
Prolog

# OverlayActionBridge reflects into the running flutter_overlay_window
# OverlayService (its static `instance`, plus `flutterView` and `windowManager`)
# to re-top the overlay and toggle keep-screen-on, because the package exposes
# no API for either. R8 otherwise renames or removes those fields, so the
# reflection throws NoSuchFieldException at runtime ("No field instance in
# ...OverlayService"). Keep the service and its members intact.
-keep class flutter.overlay.window.flutter_overlay_window.OverlayService { *; }