Limit SelfRecovery wifi restarts to some amount

This prevents wifi from getting into an extreme restart loop if there's
some repeated HAL or WIFICOND crash. Currently limits it to ~48 per day.

Added a buffer logging restarts for HAL_CRASH and WIFICOND_CRASH.
If buffer has more than 2 restarts logged in the last 2 hour time
window, further restarts are ignored. Buffer is cleaned up on every
trigger.

Bug: 62835400
Test: Unit tests
Change-Id: Idb0bc060424423f1a27782868689bff5ed2c0520
3 files changed
tree: 371fecd5422e3264c6addd36854bb5439a363417
  1. service/
  2. PREUPLOAD.cfg