Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 532ff811 authored by Yi Kong's avatar Yi Kong Committed by Automerger Merge Worker
Browse files

Merge "profcollect: trace on background thread" am: f8eb7b13 am: d353c81c...

Merge "profcollect: trace on background thread" am: f8eb7b13 am: d353c81c am: e54991b7 am: b2bed058

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1894997

Change-Id: I2735a6190ec546aee7329f3a52ada4da06befb76
parents 29b5b4da b2bed058
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -234,14 +234,16 @@ public final class ProfcollectForwardingService extends SystemService {
                "applaunch_trace_freq", 2);
        int randomNum = ThreadLocalRandom.current().nextInt(100);
        if (randomNum < traceFrequency) {
            try {
            if (DEBUG) {
                Log.d(LOG_TAG, "Tracing on app launch event: " + packageName);
            }
            BackgroundThread.get().getThreadHandler().post(() -> {
                try {
                    mIProfcollect.trace_once("applaunch");
                } catch (RemoteException e) {
                    Log.e(LOG_TAG, e.getMessage());
                }
            });
        }
    }