SyncNotifier
Builds the wallet-sync "Live Update" notification (#235) — the background counterpart to the in-app WalletSyncIndicator. An ongoing, silent, themed progress notification visible in the shade, on the lock screen, and — on Android 16 — as a promoted status-bar chip ("Kuira Syncing" / "Kuira NN%"). The phase label (dust / shielded refresh / genesis) is resolved from SyncStatus.Syncing.phase.
On API 36+ it uses the platform Notification.ProgressStyle — the rich Live-Update tracker (a themed segment + a moving tracker dot). Below 36 it falls back to a NotificationCompat BigTextStyle + classic progress bar.
Promotion (the chip) needs, per the platform contract:
the
POST_PROMOTED_NOTIFICATIONSmanifest permission (declared here),a promotion REQUEST — the
android.requestPromotedOngoingextra (whatNotificationCompat.setRequestPromotedOngoingwrites); NOT a rawFLAG_PROMOTED_ONGOING, which is the system's output signal,an ongoing notification with a promotable style (ProgressStyle / BigText),
a content title, a channel importance above
IMPORTANCE_MIN,and
setColorized(true)must NOT be used (it disqualifies promotion). The chip rendering itself is OEM-dependent (Samsung routes it to its Now Bar).
Pure text/percentage seam (syncNotificationText) stays unit-testable.
Functions
Build the ongoing progress notification for a SyncStatus.Syncing tick.
Indeterminate placeholder for the brief FGS-start window before the first real status tick arrives (generic label + the dust state icon).
Build the ongoing notification for an in-flight foreground OPERATION (#261-264): indeterminate (operations are stage-based, not %-based), with the caller's label as the body and a brand-forward chip. Reuses the same channel / promotion / style plumbing as the sync notification.
Create the sync channel once (idempotent). Importance is DEFAULT (silent — no sound/vibration) so it clears the IMPORTANCE_MIN promotion floor while staying quiet. Importance can't be raised after creation, so the old LOW channel is deleted and a new id used to take effect on upgraded installs.