Ongoing notification: stable metrics in the title, volatile details in the body#192
Merged
Merged
Conversation
The status notification's title repeated the app name that Android already prints in the header, wasting the most glanceable line. The title now carries the headline data (live percentage + status/rate, e.g. "85% · Discharging 9%/h"), and the freed content line shows the estimated time to empty/full — reusing the details table's projection (#124/#188) — plus the temperature, e.g. "~9h 27m left · 34.6 °C". The existing show-rate setting governs both the appended rate and the derived time estimate, so turning it off still yields a minimal status-and-temperature notification. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qfVAwqfzKvg3tbg8u4qox
Review follow-up: split the two lines by stability, not just "headline vs
secondary", and remove all redundancy between them.
- Title = the stable, always-available headline only: percentage + plain charge
state ("85% · Discharging"). No app name, no rate, no tier.
- Body = the volatile details, each shown only when available, joined by " · ":
the drain rate (or raw mA) while discharging / the charge power in watts while
charging, then the estimated time, then the temperature. The charging body
shows wattage without the "Fast charging" tier word, since the title already
says the phone is charging — so the lines never repeat.
Also from the review:
- statusWithRate / chargingSpeedSegment removed (title no longer needs them);
the tier label stays only on the charge-connected popup. New wattage-only
string; the tier+wattage and 2-part detail strings dropped.
- The "Show rate in status notification" toggle now reads "Show rate & time…"
and its summaries match what it governs (rate/power + time; temperature always
shows).
- showRateEnabled is read once per build and passed down (was read twice).
- Arabic updated for all of the above (drafted, pending review).
Tests: OngoingStatusLines reworked to the new lines (stable title; discharging
rate+time+temp; charging watts+time+temp; charge-rate fallback when power
unknown; temperature-only when the toggle is off; unknown/empty on null).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 19, 2026
This was referenced Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The persistent status notification's title was hard-coded to the app name — but Android already prints the app name in the notification header, so the boldest, most glanceable line was pure repetition.
Change
The two lines are now split by stability, with no redundancy between them:
85% · Discharging/85% · Charging. No app name, no rate, no tier (those move to the body).·:9%/h, or the raw mA) while discharging, or the charge power (~18 W) while charging;~9h 27m left/~45m to full), the same capacity-free projection the details table uses (Charging: time-to-full as a details-table row (rescoped — no standalone feature) #124/Details table: stop rows showing/hiding — keep Rate / Time / Current always present with a placeholder + info icon #188);9%/h · ~9h 27m left · 34.6 °Cor~18 W · ~45m to full · 34.6 °C, degrading gracefully down to just the temperature.The charging body shows the wattage without the "Fast charging" tier word, because the title already says the phone is charging — so the title and body never repeat each other.
Details:
85% · Discharging+ temperature.statusWithRate/chargingSpeedSegmentare removed (the title no longer needs them); the charge-tier label stays only on the separate charge-connected popup. New wattage-only string; the old tier+wattage and 2-part detail strings dropped.showRateEnabledis read once per build (was twice).values/andvalues-ar/(Arabic drafted — pending maintainer review).Testing
NotificationServiceTest.OngoingStatusLines(6 tests): stable title from the built notification; discharging rate+time+temp; charging watts+time+temp; charge-rate fallback when power is unknown; temperature-only when the toggle is off; unknown title + empty detail on a null snapshot.:app:testDebugUnitTest(435) +lintDebugpass on the local toolchain; installed on the Mate 10 Pro.Supersedes the original single-commit version (which put the rate in the title); reworked per review.