profcollect: check hardware capability on a background thread
This is a blocking event, needs to be moved off from the main thread. Also, don't schedule background processing service if the hardware has no tracing support. Test: manual Bug: 79161490 Bug: 206986559 Change-Id: I039211b26f25ead66cf125f152e794b0c08057ee
This commit is contained in:
@@ -91,10 +91,12 @@ public final class ProfcollectForwardingService extends SystemService {
|
||||
if (mIProfcollect == null) {
|
||||
return;
|
||||
}
|
||||
if (serviceHasSupportedTraceProvider()) {
|
||||
registerObservers();
|
||||
}
|
||||
ProfcollectBGJobService.schedule(getContext());
|
||||
BackgroundThread.get().getThreadHandler().post(() -> {
|
||||
if (serviceHasSupportedTraceProvider()) {
|
||||
registerObservers();
|
||||
ProfcollectBGJobService.schedule(getContext());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user