diff options
author | Gavin Corkery <gavincorkery@google.com> | 2019-12-17 19:02:54 +0000 |
---|---|---|
committer | Gavin Corkery <gavincorkery@google.com> | 2020-01-15 19:20:57 +0000 |
commit | aa57ef3e465a74c7f3a1034ac9f9912e5e8c707d (patch) | |
tree | 06583dd35571a8bc749265c3d9894a8ac89283fe /services/java/com/android/server/SystemServer.java | |
parent | 859249aed788926dd189b3346ec72e4f73534e2b (diff) |
Integrate Rescue Party boot loop logic to Package Watchdog
Make Package Watchdog the component that receives calls
about boot events, and decides on whether or not to
perform mitigation action for a perceived boot loop.
The logic for selecting an observer to handle boot loops
is similar to how package failure is handled. The threshold
logic is the same as it was in Rescue Party (5 system server
boots in 10 minutes). Rescue Party maintains its own rescue
levels internally, which map to user impact levels.
Add optional onBootLoop() and executeBootLoopMitigation() methods
to PackageHealthObserver.
Add tests to handle the new cases handled by Package Watchdog.
Test: atest RescuePartyTest
Test: atest PackageWatchdogTest
Bug: 136135457
Change-Id: Ic435e60318e369509975c19a9888741e047803de
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index b6a8ca447213..1177c258b0ea 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -752,7 +752,7 @@ public final class SystemServer { // note that we just booted, which might send out a rescue party if // we're stuck in a runtime restart loop. RescueParty.registerHealthObserver(mSystemContext); - RescueParty.noteBoot(mSystemContext); + PackageWatchdog.getInstance(mSystemContext).noteBoot(); // Manages LEDs and display backlight so we need it to bring up the display. t.traceBegin("StartLightsService"); |