From fe645217070478c72b9b39d0f9678badf49111cd Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 2 Oct 2026 22:33:20 +0200 Subject: [PATCH] fix(widgets): keep GlanceAppWidget classes distinct under R8 R8 merged the near-identical widget classes (timer, quick timer, stopwatch, digital clock) into the analog clock's class. Glance finds a widget's placed instances by its GlanceAppWidget's class name, so every updateAll hit every widget: starting a quick timer redrew the timer widgets' content into the analog and digital clocks until their config screen re-rendered them. 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 0ce5857..6a476aa 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -23,5 +23,11 @@ # the host, and every widget shows "Can't load widget". -keep class * extends androidx.work.InputMerger { (); } +# Glance finds a widget's placed instances by its GlanceAppWidget's class name +# (`updateAll`, `getGlanceIds`). R8 merged the near-identical widget classes +# into one, so every widget shared a name: starting a quick timer redrew the +# timer widgets' content into the analog clock's slots, too. +-keep class * extends androidx.glance.appwidget.GlanceAppWidget + # Compose Compiler may keep its own; defaults are fine -dontwarn org.jetbrains.annotations.**