Detect and report soft resets

Soft reset means that only the Android system/framework resets without
rebooting the Linux kernel. From Android app side, a soft reset looks
like a hard reset, because boot events are triggered again.

Hiccup needs to be able to distinguish between soft and hard resets,
because on a soft reset we need to read the current, not the last kernel
logs to get useful information. Also, other shutdown/boot/reboot reasons
reported by the kernel are not very meaningful on a soft reset.

This change assumes that the Hiccup app queries boot reasons only once
per Android system boot. The native Hiccup daemon persists soft resets,
therefore it can assume that when the app queries the boot reason
multiple times, a soft reset occurred.

Issue: FP2P-490
Change-Id: I77a20dcc91f9c9a7eec5f4a464d186143f6ce81e
2 files changed
tree: 7a8b2efa0b40f229a89f0e400a2d633b86f5237c
  1. frameworks/
  2. native/
  3. sepolicy/
  4. .gitignore
  5. hiccup.mk
  6. init.fp.hiccup.rc