Proper handling of NetworkStack crash
Instead of always crashing on userdebug builds, do the following on all
builds:
- If the device did not observe a NetworkStack crash in the last 6h
crash the system server. This is to handle spurious crashes of the
NetworkStack, so that the system can recover instead of staying
without connectivity.
- Otherwise, the device has had a recent crash. Notify the listeners
(watchdog listener to be added) that something is seriously wrong,
but do not crash to avoid bootlooping the device. This allows the
watchdog to do its job, and avoids bricking the device in
situations where the user could need to make emergency calls.
Bug: 133725814
Test: Killed the network stack, observe reboot of framework.
Test: Kill network stack again, observe nothing.
Test: Wipe data, install new network stack, kill it twice: rollback.
(with patch on top applied)
Change-Id: If1fa00bed769eb60ca4832609006bdf15ceddb80
1 file changed