diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-28 23:00:18 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-28 23:00:18 +0000 |
commit | 693dbb891e41b8f300298d828994fe7e11b9753d (patch) | |
tree | 7a2ba1dc660a7b36b3283d8ad42e4d1b0580eceb | |
parent | 30c280a1b1fc8f98641bbb40ef9bc44da35976c9 (diff) | |
parent | 41f0c1b5eb50b95125ba9b0319698b2377560013 (diff) | |
download | cts-693dbb891e41b8f300298d828994fe7e11b9753d.tar.gz |
Snap for 7773089 from 41f0c1b5eb50b95125ba9b0319698b2377560013 to pie-vts-release
Change-Id: I8fb240ddd3f4c3a759922654402d6c7486f9f1e1
-rw-r--r-- | tests/tests/os/src/android/os/cts/FileObserverTest.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/tests/os/src/android/os/cts/FileObserverTest.java b/tests/tests/os/src/android/os/cts/FileObserverTest.java index 744963e1759..287df074ec1 100644 --- a/tests/tests/os/src/android/os/cts/FileObserverTest.java +++ b/tests/tests/os/src/android/os/cts/FileObserverTest.java @@ -242,11 +242,8 @@ public class FileObserverTest extends AndroidTestCase { String message = "Expected to contain: " + expectedEvents + " Actual: " + actualEvents; int j = 0; for (int i = 0; i < expected.length; i++) { - while (expected[i] != moveEvents[j].event) { - j++; - if (j >= moveEvents.length) - fail(message); - } + while (j < moveEvents.length && expected[i] != moveEvents[j].event) j++; + if (j >= moveEvents.length) fail(message); j++; } } |