Commit 32fd543
committed
fix: self-heal BootReceiver on startup to survive aggressive OS pruning
Some smart display and TV OS implementations silently place background broadcast
receivers into a disabledComponents list after reboot. This breaks the standard
BOOT_COMPLETED broadcast and prevents the launcher service from starting unattended
after hard power cuts.
Added an initialization check in LauncherService.onCreate() that dynamically re-enables
BootReceiver via PackageManager if it was tampered with by the OS, ensuring the
web server will restart successfully on the next boot cycle.
Ported fix from PR #17 (credit: @andornaut).1 parent 1bb037c commit 32fd543
3 files changed
Lines changed: 67 additions & 1 deletion
File tree
- .idea
- app/src/main/java/com/tpn/displaylauncher
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
50 | 80 | | |
51 | 81 | | |
52 | 82 | | |
| 83 | + | |
| 84 | + | |
53 | 85 | | |
54 | 86 | | |
55 | 87 | | |
| |||
87 | 119 | | |
88 | 120 | | |
89 | 121 | | |
90 | | - | |
| 122 | + | |
91 | 123 | | |
92 | 124 | | |
93 | 125 | | |
| |||
0 commit comments