Loading services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +8 −11 Original line number Diff line number Diff line Loading @@ -323,16 +323,14 @@ public final class ProfcollectForwardingService extends SystemService { "dex2oat_trace_freq", 25); int randomNum = ThreadLocalRandom.current().nextInt(100); if (randomNum < traceFrequency) { BackgroundThread.get().getThreadHandler().post(() -> { // Dex2oat could take a while before it starts. Add a short delay before start tracing. BackgroundThread.get().getThreadHandler().postDelayed(() -> { try { // Dex2oat could take a while before it starts. Add a short delay before start // tracing. Thread.sleep(1000); mIProfcollect.trace_once("dex2oat"); } catch (RemoteException | InterruptedException e) { } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); } }); }, 1000); } } Loading Loading @@ -394,15 +392,14 @@ public final class ProfcollectForwardingService extends SystemService { if (randomNum >= traceFrequency) { return; } BackgroundThread.get().getThreadHandler().post(() -> { // Wait for 1s before starting tracing. BackgroundThread.get().getThreadHandler().postDelayed(() -> { try { // Wait for a short time before starting tracing. Thread.sleep(1000); mIProfcollect.trace_once("camera"); } catch (RemoteException | InterruptedException e) { } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); } }); }, 1000); } }, null); } Loading Loading
services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +8 −11 Original line number Diff line number Diff line Loading @@ -323,16 +323,14 @@ public final class ProfcollectForwardingService extends SystemService { "dex2oat_trace_freq", 25); int randomNum = ThreadLocalRandom.current().nextInt(100); if (randomNum < traceFrequency) { BackgroundThread.get().getThreadHandler().post(() -> { // Dex2oat could take a while before it starts. Add a short delay before start tracing. BackgroundThread.get().getThreadHandler().postDelayed(() -> { try { // Dex2oat could take a while before it starts. Add a short delay before start // tracing. Thread.sleep(1000); mIProfcollect.trace_once("dex2oat"); } catch (RemoteException | InterruptedException e) { } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); } }); }, 1000); } } Loading Loading @@ -394,15 +392,14 @@ public final class ProfcollectForwardingService extends SystemService { if (randomNum >= traceFrequency) { return; } BackgroundThread.get().getThreadHandler().post(() -> { // Wait for 1s before starting tracing. BackgroundThread.get().getThreadHandler().postDelayed(() -> { try { // Wait for a short time before starting tracing. Thread.sleep(1000); mIProfcollect.trace_once("camera"); } catch (RemoteException | InterruptedException e) { } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage()); } }); }, 1000); } }, null); } Loading