Loading services/core/java/com/android/server/am/ActivityManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -18322,9 +18322,11 @@ public class ActivityManagerService extends IActivityManager.Stub } } public void waitForBroadcastBarrier(@Nullable PrintWriter pw) { public void waitForBroadcastBarrier(@Nullable PrintWriter pw, boolean flushBroadcastLoopers) { enforceCallingPermission(permission.DUMP, "waitForBroadcastBarrier()"); if (flushBroadcastLoopers) { BroadcastLoopers.waitForBarrier(pw); } for (BroadcastQueue queue : mBroadcastQueues) { queue.waitForBarrier(pw); } services/core/java/com/android/server/am/ActivityManagerShellCommand.java +11 −1 Original line number Diff line number Diff line Loading @@ -3131,7 +3131,17 @@ final class ActivityManagerShellCommand extends ShellCommand { } int runWaitForBroadcastBarrier(PrintWriter pw) throws RemoteException { mInternal.waitForBroadcastBarrier(pw); boolean flushBroadcastLoopers = false; String opt; while ((opt = getNextOption()) != null) { if (opt.equals("--flush-broadcast-loopers")) { flushBroadcastLoopers = true; } else { getErrPrintWriter().println("Error: Unknown option: " + opt); return -1; } } mInternal.waitForBroadcastBarrier(pw, flushBroadcastLoopers); return 0; } Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -18322,9 +18322,11 @@ public class ActivityManagerService extends IActivityManager.Stub } } public void waitForBroadcastBarrier(@Nullable PrintWriter pw) { public void waitForBroadcastBarrier(@Nullable PrintWriter pw, boolean flushBroadcastLoopers) { enforceCallingPermission(permission.DUMP, "waitForBroadcastBarrier()"); if (flushBroadcastLoopers) { BroadcastLoopers.waitForBarrier(pw); } for (BroadcastQueue queue : mBroadcastQueues) { queue.waitForBarrier(pw); }
services/core/java/com/android/server/am/ActivityManagerShellCommand.java +11 −1 Original line number Diff line number Diff line Loading @@ -3131,7 +3131,17 @@ final class ActivityManagerShellCommand extends ShellCommand { } int runWaitForBroadcastBarrier(PrintWriter pw) throws RemoteException { mInternal.waitForBroadcastBarrier(pw); boolean flushBroadcastLoopers = false; String opt; while ((opt = getNextOption()) != null) { if (opt.equals("--flush-broadcast-loopers")) { flushBroadcastLoopers = true; } else { getErrPrintWriter().println("Error: Unknown option: " + opt); return -1; } } mInternal.waitForBroadcastBarrier(pw, flushBroadcastLoopers); return 0; } Loading