Commit 8016d96
committed
FullCharge: Rebalance notification channel importance and naming
The reconnect-gesture channel drops from DEFAULT to LOW so it lands in the
shade's silent section. DEFAULT bought nothing: all four foreground-service
notifications share SESSION_ID and set onlyAlertOnce, so the reconnect
countdown never re-alerted and the importance only produced one alert when the
service went foreground. LOW keeps the status-bar icon that makes an armed
gesture discoverable.
The recovery channel goes the other way, DEFAULT to HIGH, and its notification
gains CATEGORY_ERROR. It fires when the protective policy could not be
restored, so the battery charges unprotected until the user intervenes — it
was ranked below the charge alarm, a convenience reminder. It is rare,
auto-cancels, and is withdrawn as soon as a restore succeeds.
Neither importance change reaches an existing install: a channel's importance
is fixed once created. That is deliberate — no migration channel ids while the
app is pre-launch.
The session channel is renamed "Temporary full charge" -> "Full charge and
restore" because recovering() shares it with session(), so it covers both
lifting the limit and putting it back. Its id stays temporary_full_charge;
ids are permanent and changing one would reset the channel's settings. Names
and descriptions, unlike importance, do update on an existing channel.
Also extracts the two hardcoded English channel descriptions to strings.xml
and adds the missing one for the recovery channel, which was the only channel
describing itself with a bare name.1 parent 17a86b6 commit 8016d96
2 files changed
Lines changed: 42 additions & 10 deletions
File tree
- app/src/main
- java/eu/darken/amply/fullcharge/core
- res/values
Lines changed: 38 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
39 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
44 | | - | |
| 56 | + | |
45 | 57 | | |
46 | | - | |
| 58 | + | |
47 | 59 | | |
48 | 60 | | |
49 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
54 | | - | |
55 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
56 | 75 | | |
57 | | - | |
58 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
| |||
191 | 211 | | |
192 | 212 | | |
193 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
194 | 220 | | |
195 | 221 | | |
196 | 222 | | |
| |||
236 | 262 | | |
237 | 263 | | |
238 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
239 | 268 | | |
240 | 269 | | |
241 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
0 commit comments