Hold "volume up" during boot to disable all overlays

Following the way "safe mode" was coded, you can now long press
"volume up" during boot to automatically disable all overlays
(from the current system/owner user).

This should come in handy as a global "reset" mechanism.

Example output:
03-12 03:22:07.090   678   678 D TEST    : Disabling overlay android.GalaxyEvolution
03-12 03:22:07.176   678   678 D TEST    : Disabling overlay com.android.launcher3.GalaxyEvolution
03-12 03:22:07.267   678   678 D TEST    : Disabling overlay com.android.server.telecom.GalaxyEvolution

Caveats:
SystemServer seems to have already loaded a context based on the
overlays by the time "disableOverlays" is finished, so SystemUI
turns up themed, even if the overlay is correctly disabled.

In the case of a user using this reset mode to "fix" a SystemUI FC,
this means that the user will experience one more FC after boot
(which then would trigger a SystemUI restart, loading the default
theme this time, and thus ending the FC loop).

Change-Id: I64fb769ea175d37a90a0804f916926b63e5b93ca
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
3 files changed