Notification small icon is a framework dialog asset #43
Labels
No Label
P0
P1
P2
release-blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Privacy-Period-Tracker#43
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while checking whether an artwork change could affect notifications. It cannot — but this was sitting there.
What is true now
core/notifications/src/main/kotlin/dev/privacyllc/period/core/notifications/PeriodNotifier.kt:102and:109both call.setSmallIcon(android.R.drawable.ic_dialog_info)— once for the public lock-screen version and once for the private one.Android masks a notification's small icon to a white silhouette from its alpha channel.
ic_dialog_infois a full-colour framework asset, so what reaches the status bar and the shade is its silhouette, not the icon anyone chose.Everything else about notifications is clean and deliberate: no
setLargeIconanywhere, noR.drawablereference in the module at all, action icons are literally0, and no manifestmeta-datanames a notification icon. An artwork change genuinely cannot break them.What it costs
The status bar icon is the app's identity in the one place the product is most careful about — the lock screen. Every reminder this app has ever sent has shown a generic framework glyph.
What to do
Use a single-colour vector.
app/src/main/res/drawable/ic_launcher_monochrome.xmlis already exactly that: a ring with one offset dot, drawn as the themed-icon layer for precisely this reason — it reads at small sizes in one colour. It will need to move or be duplicated intocore/notifications, since that module cannot see:appresources.Traps
NotificationPrivacyTeststill passes — it asserts what a lock screen would render.Verify: a reminder fired on
PeriodQAand onPeriodMinSdk26shows the app's own mark in the status bar and in the shade, in both themes, andNotificationPrivacyTeststill passes.Fixed in
caf1244.core/notifications/src/main/res/drawable/ic_notification.xml— redrawn, not copied.ic_launcher_monochrome.xmlis a 108dp launcher canvas whose shape sits in the upper safe zone because a launcher crops and masks it; copying that geometry would have put a small mark floating above centre in the status bar. This is a 24dp canvas the ring nearly fills, opaque white throughout, since the system discards colour and supplies its own.Both call sites,
PeriodNotifier.kt:102and:109.Two tests, because "which resource id" is not the whole claim
bothTheLockScreenAndTheShadeShowThisAppsOwnMarkreads the postedNotificationrather than the source, and checkspublicVersionseparately. A change made by half is the likely mistake and it fails silently on exactly the surface this product is most careful about.theStatusBarMarkRendersAsAReadableSilhouetterenders the vector and measures alpha coverage. Two failures look identical in source and completely different in the status bar — a vector that draws nothing, and one that draws a filled shape — and neither is caught by asserting a resource id.Proved to fail: reverting only the public builder to
ic_dialog_info:NotificationPrivacyTestcould never run on minSdk, and nobody knewFound while trying to satisfy this issue's own verify line.
GrantPermissionRuleasked forPOST_NOTIFICATIONSunconditionally — a permission that arrived in API 33. OnPeriodMinSdk26every test in the class failed withFailed to grant permissionsbefore reaching a single assertion, for a reason having nothing to do with notifications.That is how it stayed hidden: it is the only emulator where it fails, and a green run on a modern image looks like a green run. The class guards what a locked screen shows. "Passes on the newest device" was never the claim worth having.
The rule is conditional now; below 33 no permission is needed to post at all, so a no-op rule is correct rather than a workaround. All six tests now pass on
PeriodMinSdk26— the first time this file has ever run there.Traps from the issue, each addressed
#FFFFFFFF, and the render test fails if the shape becomes a blob.NotificationPrivacyTeststill passes — it now passes somewhere it never could before.The new drawable also brought
core/notifications/src/main/resundercheckThemedDrawables(#42, landed just before this), whereic_notificationis exempted with its reason: the system masks it to a silhouette and supplies the colour, so a dark variant would never be drawn.Not verified
The API 36 instrumented run. That emulator dies the moment Gradle starts on this machine today — three attempts, including after stopping the Gradle daemons to free memory — while it ran the entire app-lock UI verification earlier in the same session. Resource contention, not a defect, but I would rather say so than imply a run that did not happen. Both new assertions are resource-id and render checks whose substance does not vary by API level, and the release checklist carries the on-device row.