Health basis honesty + 20–80% charging guidance (#114)#143
Merged
Conversation
Part A - health basis: the Insights health figure already prefers the measured value (capacity / rated capacity); the misleading case was the cycle-based fallback, whose app-tracked count starts at zero on install and so understates wear on any phone older than the app. Now: - The basis caption distinguishes the cycle sources: "reported by Android" (lifetime count, Android 14+) vs "tracked since install - real wear may be higher" (new BatteryHealthTracker.isCycleCountFromOs) - "How it works" rewritten to explain all three bases and note the cycle curve is a generic lithium-ion approximation (real cycle life varies by manufacturer and cell, Li-ion and Li-Po alike), plus the 20-80% care tip Part B - charging guidance: retire the "healthy/regular charge" concept (plugged in at <=20% flipped notification titles); starting low is not a virtue under modern guidance, and the full-charge text even encouraged staying plugged at 100%. Now: - One neutral title per event: "Charging started", "Battery fully charged"; the critical alert title "Healthy charge time" becomes "Battery critically low" - Full-charge text now nudges unplugging: batteries age fastest kept at 100%, stay roughly 20-80% day to day - Warning/critical/full copy grammar cleaned up - Deleted the healthy-flag plumbing (threshold, setIsHealthy, title flips) and six dead strings from the pre-#122 charger messages All copy mirrored in values-ar. An actual "unplug at X%" reminder stays out of scope (#115). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ZMe8rrw7eQKz69R4Xw3t5
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.
Closes #114.
What changed
Both decisions settled with the maintainer in-session (recorded in the issue body).
Part A — health basis honesty. The Insights figure already prefers the measured basis (capacity ÷ rated capacity); the misleading case was the cycle fallback, whose app-tracked count starts at zero on install and understates wear on any phone older than the app:
BatteryHealthTracker.isCycleCountFromOs()).EXTRA_TECHNOLOGYis unreliable free-text), and adds the 20–80 care tip.Part B — retire the "healthy charge" concept. Plugging in at ≤20% no longer flips notification titles; the plumbing (
HEALTHY_CHARGE_THRESHOLD,setIsHealthy, title pairs) is deleted:Verification
PowerConnectionReceiverTestupdated for the simplifiednotifyChargeConnectedsignature. In-session checks were static (env can't build, #137): no dangling references to removed strings/symbols, values ↔ values-ar parity, XML validity. CI on this PR is the compile + test gate.🤖 Generated with Claude Code
https://claude.ai/code/session_015ZMe8rrw7eQKz69R4Xw3t5
Generated by Claude Code