From a1337e7d9ad9adbe10977856d47d69d682c35a56 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 2 Oct 2026 22:15:05 +0200 Subject: [PATCH] fix(widgets): keep WorkManager's InputMerger constructor under R8 R8 under AGP 9 pruned the no-arg constructor of OverwritingInputMerger, which WorkManager instantiates reflectively before running any worker. Every Glance session worker then failed with "Could not create Input Merger", no RemoteViews reached the host, and every widget showed "Can't load widget" in minified builds. Debug builds were unaffected. --- app/proguard-rules.pro | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index d4314e3..0ce5857 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -17,5 +17,11 @@ (android.content.Context, androidx.work.WorkerParameters); } +# Before a worker runs, WorkManager also instantiates its InputMerger by name +# through the no-arg constructor. With that pruned, every Glance session +# worker fails ("Could not create Input Merger"), no RemoteViews ever reach +# the host, and every widget shows "Can't load widget". +-keep class * extends androidx.work.InputMerger { (); } + # Compose Compiler may keep its own; defaults are fine -dontwarn org.jetbrains.annotations.**