WatchDog: support dumping AIDL HALs
Similar to how HIDL HALs are here, we don't know the commandline of the service, so we can dump them based on service name prefixes. Power stats and lights are added here, for parity w/ HIDL since these hvae been converted to AIDL. Fixes: 175322136 Test: after `adb shell am hang`, we can verify the light service is dumped, when it wasn't before: vsoc_x86_64:/data/anr # cat anr_2021-01-28-22-42-44-969 | grep light Cmd line: /vendor/bin/hw/android.hardware.lights-service.example Change-Id: I8c8b0cff0c102221875114015a5524c03cfb5b5c
This commit is contained in:
@@ -287,6 +287,20 @@ public final class ServiceManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get service debug info.
|
||||
* @return an array of information for each service (like listServices, but with PIDs)
|
||||
* @hide
|
||||
*/
|
||||
public static ServiceDebugInfo[] getServiceDebugInfo() {
|
||||
try {
|
||||
return getIServiceManager().getServiceDebugInfo();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "error in getServiceDebugInfo", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is only intended to be called when the process is first being brought
|
||||
* up and bound by the activity manager. There is only one thread in the process
|
||||
|
||||
@@ -103,6 +103,10 @@ class ServiceManagerProxy implements IServiceManager {
|
||||
throw new RemoteException();
|
||||
}
|
||||
|
||||
public ServiceDebugInfo[] getServiceDebugInfo() throws RemoteException {
|
||||
return mServiceManager.getServiceDebugInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as mServiceManager but used by apps.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user