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

Commit 92c92ce3 authored by Yi Kong's avatar Yi Kong Committed by Automerger Merge Worker
Browse files

Merge "profcollect: Collect camera traces for a longer duration" into main am:...

Merge "profcollect: Collect camera traces for a longer duration" into main am: 10eddfef am: 0ad033f1

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



Change-Id: I75877882c671a67b56b9662f90aefe43c60d050b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 86bc8c62 0ad033f1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -398,13 +398,13 @@ public final class ProfcollectForwardingService extends SystemService {
                if (randomNum >= traceFrequency) {
                    return;
                }
                // For a small percentage a traces, we collect the initialization behavior.
                boolean traceInitialization = ThreadLocalRandom.current().nextInt(10) < 1;
                int traceDelay = traceInitialization ? 0 : 1000;
                String traceTag = traceInitialization ? "camera_init" : "camera";
                final int traceDelay = 1000;
                final int traceDuration = 5000;
                final String traceTag = "camera";
                BackgroundThread.get().getThreadHandler().postDelayed(() -> {
                    try {
                        mIProfcollect.trace_process(traceTag, "android.hardware.camera.provider");
                        mIProfcollect.trace_process(traceTag, "android.hardware.camera.provider",
                                traceDuration);
                    } catch (RemoteException e) {
                        Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage());
                    }