Commit 54a72fd
committed
core: Harden DeadSystem paths for optional services
Some devices legitimately ship without persistent data block / OEM lock, and
those services can also be transiently absent while system_server is still
coming up or already tearing down. Treating them like mandatory services routes
lookups through onServiceNotFound() and emits extra WTF noise right in the same
DeadSystem failure paths we are trying to contain.
ActivityManagerService also should not assume DropBox remains usable once the
system is already failing, and LockSettingsStorage should quietly skip FRP
helpers when the persistent data block service is absent instead of turning
that into another fatal-looking report.
Use nullable lookups for the optional services, whitelist them in
getSystemService(), and wrap DropBox queries/writes so these reporting paths
fail closed instead of recursively amplifying the original failure.
Signed-off-by: Quince <quinceroms@gmail.com>1 parent 06898a0 commit 54a72fd
3 files changed
Lines changed: 39 additions & 21 deletions
File tree
- core/java/android/app
- services/core/java/com/android/server
- am
- locksettings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
1221 | | - | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1222 | 1225 | | |
1223 | 1226 | | |
1224 | 1227 | | |
| |||
1234 | 1237 | | |
1235 | 1238 | | |
1236 | 1239 | | |
1237 | | - | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1238 | 1244 | | |
1239 | 1245 | | |
1240 | 1246 | | |
| |||
2113 | 2119 | | |
2114 | 2120 | | |
2115 | 2121 | | |
| 2122 | + | |
| 2123 | + | |
2116 | 2124 | | |
2117 | 2125 | | |
2118 | 2126 | | |
| |||
Lines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9585 | 9585 | | |
9586 | 9586 | | |
9587 | 9587 | | |
9588 | | - | |
| 9588 | + | |
9589 | 9589 | | |
9590 | 9590 | | |
9591 | 9591 | | |
| |||
9626 | 9626 | | |
9627 | 9627 | | |
9628 | 9628 | | |
9629 | | - | |
| 9629 | + | |
9630 | 9630 | | |
9631 | 9631 | | |
9632 | 9632 | | |
| 9633 | + | |
| 9634 | + | |
| 9635 | + | |
| 9636 | + | |
| 9637 | + | |
| 9638 | + | |
| 9639 | + | |
| 9640 | + | |
| 9641 | + | |
| 9642 | + | |
| 9643 | + | |
| 9644 | + | |
| 9645 | + | |
| 9646 | + | |
| 9647 | + | |
| 9648 | + | |
| 9649 | + | |
| 9650 | + | |
| 9651 | + | |
| 9652 | + | |
9633 | 9653 | | |
9634 | 9654 | | |
9635 | 9655 | | |
| |||
9900 | 9920 | | |
9901 | 9921 | | |
9902 | 9922 | | |
9903 | | - | |
| 9923 | + | |
9904 | 9924 | | |
9905 | 9925 | | |
9906 | 9926 | | |
| |||
10063 | 10083 | | |
10064 | 10084 | | |
10065 | 10085 | | |
10066 | | - | |
| 10086 | + | |
10067 | 10087 | | |
10068 | 10088 | | |
10069 | 10089 | | |
| |||
Lines changed: 5 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 627 | + | |
| 628 | + | |
631 | 629 | | |
| 630 | + | |
632 | 631 | | |
633 | 632 | | |
634 | 633 | | |
635 | 634 | | |
636 | 635 | | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
| 636 | + | |
| 637 | + | |
648 | 638 | | |
649 | 639 | | |
650 | 640 | | |
| |||
0 commit comments