fix(widget): the seven widgets keep their names through R8 #275

Merged
nalum merged 2 commits from fix/widget-r8-class-merge into main 2026-08-29 17:36:18 +00:00
Owner

Release v2.1.1 on a Pixel: after the first 15-minute beat, the quick add, points and jobs widgets all repaint as the today widget.

Cause. R8 horizontal class merging collapsed five of the seven GlanceAppWidget subclasses into CalendarWidget's obfuscated class (confirmed in the release mapping.txt). Glance maps a receiver's glance ids by the widget class's canonical name (GlanceAppWidgetManager), so one shared name makes getGlanceIds return every placed widget. Each updateAll in WidgetUpdater.updateAllWidgets then painted all of them, and the last writer won. Debug builds do not minify, which is why the drift never showed on the debug install.

Fix. A ProGuard keep on GlanceAppWidget subclasses blocks both the merge and the rename. A fresh release build's mapping shows all seven classes distinct and unrenamed.

Needs a patch release to reach the phone — the placed widgets recover on the first beat after update.

Release v2.1.1 on a Pixel: after the first 15-minute beat, the quick add, points and jobs widgets all repaint as the today widget. **Cause.** R8 horizontal class merging collapsed five of the seven `GlanceAppWidget` subclasses into CalendarWidget's obfuscated class (confirmed in the release `mapping.txt`). Glance maps a receiver's glance ids by the widget class's canonical name (`GlanceAppWidgetManager`), so one shared name makes `getGlanceIds` return every placed widget. Each `updateAll` in `WidgetUpdater.updateAllWidgets` then painted all of them, and the last writer won. Debug builds do not minify, which is why the drift never showed on the debug install. **Fix.** A ProGuard keep on `GlanceAppWidget` subclasses blocks both the merge and the rename. A fresh release build's mapping shows all seven classes distinct and unrenamed. Needs a patch release to reach the phone — the placed widgets recover on the first beat after update.
fix(widget): the seven widgets keep their names through R8
All checks were successful
check / commits (pull_request) Successful in 23s
check / go (pull_request) Successful in 2m49s
check / report (pull_request) Successful in 9s
check / web (pull_request) Successful in 4m26s
android / build (pull_request) Successful in 7m15s
android / report (pull_request) Successful in 4s
c03cb857dc
Release v2.1.1 on the Pixel: after the first 15-minute beat every
placed widget repaints as one of them (the today board). R8's
horizontal class merging had collapsed five of the seven
GlanceAppWidget subclasses into CalendarWidget's class, and Glance
maps a receiver's glance ids by the widget class's canonical name
(GlanceAppWidgetManager) — one shared name means getGlanceIds
returns every placed widget, so each updateAll in
WidgetUpdater.updateAllWidgets painted all of them and the last
writer won. Debug builds never minify, which is why the drift only
shows on release.

A keep on GlanceAppWidget subclasses blocks both the merge and the
rename, so each widget's ids stay its own.

Test report

Suite Tests Result Skipped
Unit 1440 ✅ pass 1
Integration 133 ✅ pass —

Coverage: 27.0%

Updated by the check workflow · commit 2bbf6b8487

<!-- ci-test-report --> ## Test report | Suite | Tests | Result | Skipped | | --- | --: | --- | --: | | Unit | 1440 | ✅ pass | 1 | | Integration | 133 | ✅ pass | — | **Coverage:** 27.0% <sub>Updated by the check workflow · commit 2bbf6b848780601ab6e5381e70c50bb0dd5a9495</sub>

Android test report

Suite Tests Result Skipped
Unit (debug) 263 ✅ pass 1

Coverage: 11.7% of lines

Updated by the android workflow · commit 2bbf6b8487

<!-- android-test-report --> ## Android test report | Suite | Tests | Result | Skipped | | --- | --: | --- | --: | | Unit (debug) | 263 | ✅ pass | 1 | **Coverage:** 11.7% of lines <sub>Updated by the android workflow · commit 2bbf6b848780601ab6e5381e70c50bb0dd5a9495</sub>
chore(deploy): the Obtainium import ships with every release
Some checks failed
check / commits (pull_request) Successful in 19s
check / go (pull_request) Successful in 3m4s
check / report (pull_request) Successful in 11s
android / report (pull_request) Has been cancelled
android / build (pull_request) Has been cancelled
check / web (pull_request) Has been cancelled
cab4468d34
The phone tracks the Forgejo releases for its APK through Obtainium,
but that source config lived only on the device. deploy/obtainium.json
now holds the export (installed-state fields cleared, source settings
kept as exported) and the binaries job copies it into every release as
a versioned asset on the signed checksums, so a fresh device imports
it from the release page and gets the same tracked source, arch filter
and update behaviour as the existing installs.
nalum force-pushed fix/widget-r8-class-merge from cab4468d34
Some checks failed
check / commits (pull_request) Successful in 19s
check / go (pull_request) Successful in 3m4s
check / report (pull_request) Successful in 11s
android / report (pull_request) Has been cancelled
android / build (pull_request) Has been cancelled
check / web (pull_request) Has been cancelled
to 2bbf6b8487
All checks were successful
check / commits (pull_request) Successful in 19s
check / go (pull_request) Successful in 2m54s
check / report (pull_request) Successful in 8s
check / web (pull_request) Successful in 4m24s
android / build (pull_request) Successful in 7m10s
android / report (pull_request) Successful in 4s
check / commits (push) Successful in 30s
check / go (push) Successful in 2m46s
check / report (push) Has been skipped
check / web (push) Successful in 4m21s
android / build (push) Successful in 7m11s
android / report (push) Has been skipped
tag / tag (push) Successful in 5m30s
release / docs (push) Successful in 1m9s
release / binaries (push) Successful in 1m42s
release / image (push) Successful in 3m12s
release / module (push) Successful in 21s
release / manifests (push) Successful in 23s
release / android (push) Successful in 4m37s
release / release (push) Successful in 13s
2026-08-29 17:28:11 +00:00
Compare
nalum merged commit 2bbf6b8487 into main 2026-08-29 17:36:18 +00:00
nalum deleted branch fix/widget-r8-class-merge 2026-08-29 17:36:18 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eagraiclainne/app!275
No description provided.