Commit be71067
authored
fix(audio-bible): restore audio bar + toolbar indicator on activity reattach and return-from-background (#219)
* fix(audio-bible): restore audio bar + toolbar indicator on activity reattach and return-from-background
The audio service survives activity recreation and backgrounding, but the
audio bar reset to hidden on the recreated/returning activity, so a playing
session lost its UI surface (Issue 5: rotation hid the bar; Issue 6: return
from background lost the bar + verse marker while audio kept playing).
IsiActivity.onStart now calls AudioBarController.reshowIfSessionActive(),
which binds to the service only when it reports an active session
(BibleAudioService.hasActiveSession) and re-shows the bar once the first
active PlaybackState arrives — re-synced via the existing StateFlow
collection, no flicker, no service spin-up for users who never started audio.
The toolbar menuAudio active icon follows the restored bar visibility. The
service stays the source of truth; no onSaveInstanceState added.
* refactor(audio-bible): consolidate pending-reshow handling into a single one-shot branch1 parent f5385bf commit be71067
5 files changed
Lines changed: 149 additions & 0 deletions
File tree
- Alkitab/src
- main/java/yuku/alkitab/base
- audio
- test/java/yuku/alkitab/base/audio
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
1147 | 1152 | | |
1148 | 1153 | | |
1149 | 1154 | | |
| |||
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
| |||
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
214 | 240 | | |
215 | 241 | | |
216 | 242 | | |
| |||
357 | 383 | | |
358 | 384 | | |
359 | 385 | | |
| 386 | + | |
360 | 387 | | |
361 | 388 | | |
362 | 389 | | |
| |||
390 | 417 | | |
391 | 418 | | |
392 | 419 | | |
| 420 | + | |
393 | 421 | | |
394 | 422 | | |
395 | 423 | | |
| |||
523 | 551 | | |
524 | 552 | | |
525 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
526 | 577 | | |
527 | 578 | | |
528 | 579 | | |
| |||
597 | 648 | | |
598 | 649 | | |
599 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
600 | 666 | | |
601 | 667 | | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
| |||
304 | 316 | | |
305 | 317 | | |
306 | 318 | | |
| 319 | + | |
307 | 320 | | |
308 | 321 | | |
309 | 322 | | |
| |||
326 | 339 | | |
327 | 340 | | |
328 | 341 | | |
| 342 | + | |
329 | 343 | | |
330 | 344 | | |
331 | 345 | | |
| |||
487 | 501 | | |
488 | 502 | | |
489 | 503 | | |
| 504 | + | |
490 | 505 | | |
491 | 506 | | |
492 | 507 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
| |||
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments