Loading services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -398,13 +398,13 @@ public final class ProfcollectForwardingService extends SystemService { if (randomNum >= traceFrequency) { if (randomNum >= traceFrequency) { return; return; } } // For a small percentage a traces, we collect the initialization behavior. final int traceDelay = 1000; boolean traceInitialization = ThreadLocalRandom.current().nextInt(10) < 1; final int traceDuration = 5000; int traceDelay = traceInitialization ? 0 : 1000; final String traceTag = "camera"; String traceTag = traceInitialization ? "camera_init" : "camera"; BackgroundThread.get().getThreadHandler().postDelayed(() -> { BackgroundThread.get().getThreadHandler().postDelayed(() -> { try { try { mIProfcollect.trace_process(traceTag, "android.hardware.camera.provider"); mIProfcollect.trace_process(traceTag, "android.hardware.camera.provider", traceDuration); } catch (RemoteException e) { } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); } } Loading Loading
services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -398,13 +398,13 @@ public final class ProfcollectForwardingService extends SystemService { if (randomNum >= traceFrequency) { if (randomNum >= traceFrequency) { return; return; } } // For a small percentage a traces, we collect the initialization behavior. final int traceDelay = 1000; boolean traceInitialization = ThreadLocalRandom.current().nextInt(10) < 1; final int traceDuration = 5000; int traceDelay = traceInitialization ? 0 : 1000; final String traceTag = "camera"; String traceTag = traceInitialization ? "camera_init" : "camera"; BackgroundThread.get().getThreadHandler().postDelayed(() -> { BackgroundThread.get().getThreadHandler().postDelayed(() -> { try { try { mIProfcollect.trace_process(traceTag, "android.hardware.camera.provider"); mIProfcollect.trace_process(traceTag, "android.hardware.camera.provider", traceDuration); } catch (RemoteException e) { } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); } } Loading