Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0935343 authored by Costin Manolache's avatar Costin Manolache
Browse files

waitWithTimeout() needs to check if the result is already available, like waitForActivity() does.

Change-Id: I410ab590d6669d5a657f473877a2bb3cae36d0d3
parent 47b779b9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -536,10 +536,12 @@ public class Instrumentation {
         */
        public final Activity waitForActivityWithTimeout(long timeOut) {
            synchronized (this) {
                if (mLastActivity == null) {
                    try {
                        wait(timeOut);
                    } catch (InterruptedException e) {
                    }
                }
                if (mLastActivity == null) {
                    return null;
                } else {