Merge "Avoiding cascading "nested events checking" failure after timed-out wait" into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d60e33de3e
@@ -1283,10 +1283,10 @@ public final class LauncherInstrumentation {
|
||||
public Closable eventsCheck() {
|
||||
Assert.assertTrue("Nested event checking", !sCheckingEvents);
|
||||
disableSensorRotation();
|
||||
sCheckingEvents = true;
|
||||
final int initialPid = getPid();
|
||||
if (sEventChecker == null) sEventChecker = new LogEventChecker();
|
||||
sEventChecker.start();
|
||||
sCheckingEvents = true;
|
||||
|
||||
return () -> {
|
||||
if (initialPid != getPid()) {
|
||||
|
||||
@@ -69,8 +69,9 @@ public class LogEventChecker {
|
||||
mFinished.await();
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
mFinished = null;
|
||||
}
|
||||
mFinished = null;
|
||||
}
|
||||
mEvents.clear();
|
||||
Log.d(SKIP_EVENTS_TAG, "Cleared events");
|
||||
|
||||
Reference in New Issue
Block a user