From 06ba1b2d509ca9df83f0756fc1524eeb59ee289a Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Tue, 2 Jul 2019 13:51:53 -0700 Subject: [PATCH] Add SystemSuspend HAL to ANR list. Makes SystemSuspend native stack traces available in ANR dumps and adb bugreport. Bug: 135458700 Test: adb shell am hang; check /data/anr/ for android.system.suspend stack traces. Test: adb shell am hang, adb bugreport, grep through bug report for suspend stack traces. (grep -rn "Cmd line: /system/bin/hw/android.system.suspend@1.0-service") Test: Confirmed that deadlock on suspend/resume path triggers ANR dump. Simulated deadlock by adding sleep to suspend thread. Unplug the device lock the screen and wait for suspend to trigger. Check anr dump and bugreport for stack traces. Test: Confirmed traces are also available on user builds via adb bugreport. (adb bugreport pulls data from ANR dump files). Change-Id: I6be189f11193f12351fcf07c6583dce3402de28d Merged-In: Id274afd4e3fbe2288ef6d5f6566c2601b8fc0a50 Merged-In: Icfc67c544e8d3fe3ef59ac12801c1a82c5545935 --- services/core/java/com/android/server/Watchdog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java index 4e416a27c8eac..1046e82de2bc5 100644 --- a/services/core/java/com/android/server/Watchdog.java +++ b/services/core/java/com/android/server/Watchdog.java @@ -103,6 +103,7 @@ public class Watchdog extends Thread { public static final List HAL_INTERFACES_OF_INTEREST = Arrays.asList( "android.hardware.audio@2.0::IDevicesFactory", "android.hardware.audio@4.0::IDevicesFactory", + "android.hardware.biometrics.face@1.0::IBiometricsFace", "android.hardware.bluetooth@1.0::IBluetoothHci", "android.hardware.camera.provider@2.4::ICameraProvider", "android.hardware.graphics.allocator@2.0::IAllocator", @@ -113,7 +114,7 @@ public class Watchdog extends Thread { "android.hardware.media.omx@1.0::IOmxStore", "android.hardware.sensors@1.0::ISensors", "android.hardware.vr@1.0::IVr", - "android.hardware.biometrics.face@1.0::IBiometricsFace" + "android.system.suspend@1.0::ISystemSuspend" ); static Watchdog sWatchdog;