Merge "Explicitly add "flush-broadcast-loopers" option." into udc-dev am: 5835f7d555 am: 903ab0aebe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23328616 Change-Id: I66e4eae1d33a3994bee8b14d4df7ec09af6e06c1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -80,7 +80,7 @@ public class BenchmarkRunner {
|
||||
|
||||
private void prepareForNextRun() {
|
||||
SystemClock.sleep(COOL_OFF_PERIOD_MS);
|
||||
ShellHelper.runShellCommand("am wait-for-broadcast-idle");
|
||||
ShellHelper.runShellCommand("am wait-for-broadcast-idle --flush-broadcast-loopers");
|
||||
mStartTimeNs = System.nanoTime();
|
||||
mPausedDurationNs = 0;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class BenchmarkRunner {
|
||||
* to avoid unnecessary waiting.
|
||||
*/
|
||||
public void resumeTiming() {
|
||||
ShellHelper.runShellCommand("am wait-for-broadcast-idle");
|
||||
ShellHelper.runShellCommand("am wait-for-broadcast-idle --flush-broadcast-loopers");
|
||||
resumeTimer();
|
||||
}
|
||||
|
||||
|
||||
@@ -1541,7 +1541,8 @@ public class UserLifecycleTests {
|
||||
|
||||
private void waitForBroadcastIdle() {
|
||||
try {
|
||||
ShellHelper.runShellCommandWithTimeout("am wait-for-broadcast-idle", TIMEOUT_IN_SECOND);
|
||||
ShellHelper.runShellCommandWithTimeout(
|
||||
"am wait-for-broadcast-idle --flush-broadcast-loopers", TIMEOUT_IN_SECOND);
|
||||
} catch (TimeoutException e) {
|
||||
Log.e(TAG, "Ending waitForBroadcastIdle because it is taking too long", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user