Skip to content
Snippets Groups Projects
Commit 241e1a5c authored by Yi Kong's avatar Yi Kong Committed by Gerrit Code Review
Browse files

Merge "profcollect: Make binder call on a background thread" into main

parents 63159a4f 91c006de
No related branches found
No related tags found
No related merge requests found
...@@ -370,18 +370,18 @@ public final class ProfcollectForwardingService extends SystemService { ...@@ -370,18 +370,18 @@ public final class ProfcollectForwardingService extends SystemService {
} }
private static void createAndUploadReport(ProfcollectForwardingService pfs) { 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(() -> { 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() Intent intent = new Intent()
.setPackage("com.android.shell") .setPackage("com.android.shell")
.setAction("com.android.shell.action.PROFCOLLECT_UPLOAD") .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