Skip to content
Snippets Groups Projects
Commit 91c006de authored by Yi Kong's avatar Yi Kong
Browse files

profcollect: Make binder call on a background thread

Bug: 342527967
Change-Id: I41811e2dae454c67435c1c99d10bc3a28894fbd1
Test: presubmit
parent 6a7f2787
No related branches found
No related tags found
No related merge requests found
......@@ -370,18 +370,18 @@ public final class ProfcollectForwardingService extends SystemService {
}
private static void createAndUploadReport(ProfcollectForwardingService pfs) {
String reportName;
try {
reportName = pfs.mIProfcollect.report(pfs.mUsageSetting) + ".zip";
} catch (RemoteException e) {
Log.e(LOG_TAG, "Failed to create report: " + e.getMessage());
return;
}
if (!pfs.mUploadEnabled) {
Log.i(LOG_TAG, "Upload is not enabled.");
return;
}
BackgroundThread.get().getThreadHandler().post(() -> {
String reportName;
try {
reportName = pfs.mIProfcollect.report(pfs.mUsageSetting) + ".zip";
} catch (RemoteException e) {
Log.e(LOG_TAG, "Failed to create report: " + e.getMessage());
return;
}
if (!pfs.mUploadEnabled) {
Log.i(LOG_TAG, "Upload is not enabled.");
return;
}
Intent intent = new Intent()
.setPackage("com.android.shell")
.setAction("com.android.shell.action.PROFCOLLECT_UPLOAD")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment