Skip to content

Ongoing notification: stable metrics in the title, volatile details in the body#192

Merged
almothafar merged 2 commits into
masterfrom
claude/notification-title-redundancy-vc8mpz
Jul 19, 2026
Merged

Ongoing notification: stable metrics in the title, volatile details in the body#192
almothafar merged 2 commits into
masterfrom
claude/notification-title-redundancy-vc8mpz

Conversation

@almothafar

@almothafar almothafar commented Jul 19, 2026

Copy link
Copy Markdown
Owner

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:

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:

  • The "Show rate in status notification" toggle is renamed "Show rate & time in status notification" and its summaries now match what it governs (the rate/power + the time estimate; the temperature always shows). Turning it off yields 85% · Discharging + temperature.
  • statusWithRate / chargingSpeedSegment are 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. showRateEnabled is read once per build (was twice).
  • New/changed strings in values/ and values-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.
  • Full :app:testDebugUnitTest (435) + lintDebug pass 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.

claude and others added 2 commits July 19, 2026 00:16
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>
@almothafar almothafar changed the title Ongoing notification: headline data in the title instead of the app name Ongoing notification: stable metrics in the title, volatile details in the body Jul 19, 2026
@almothafar
almothafar merged commit f94a0a9 into master Jul 19, 2026
2 checks passed
@almothafar
almothafar deleted the claude/notification-title-redundancy-vc8mpz branch July 19, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants