diff options
author | 2025-03-06 13:28:12 -0800 | |
---|---|---|
committer | 2025-03-06 13:28:12 -0800 | |
commit | 3fab0eab87de9b3d7cf0c69e7b4bc130f126a94f (patch) | |
tree | bd1fcf5ceeacc4b1470f6f53b0d939820e079b1a | |
parent | 98567c3c1953325d0bfa6a32b07a225b2d6041b3 (diff) |
Improve Baklava detection in TestLooper
Flag: EXEMPT test-only code
Bug: 379472827
Change-Id: Idf4fb68eba9b50a798455e8e32bede20b34fabdf
-rw-r--r-- | tests/utils/testutils/java/android/os/test/TestLooper.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/utils/testutils/java/android/os/test/TestLooper.java b/tests/utils/testutils/java/android/os/test/TestLooper.java index 4d379e45a81a..bb54a26036db 100644 --- a/tests/utils/testutils/java/android/os/test/TestLooper.java +++ b/tests/utils/testutils/java/android/os/test/TestLooper.java @@ -68,16 +68,7 @@ public class TestLooper { * Baklava introduces new {@link TestLooperManager} APIs that we can use instead of reflection. */ private static boolean isAtLeastBaklava() { - Method[] methods = TestLooperManager.class.getMethods(); - for (Method method : methods) { - if (method.getName().equals("peekWhen")) { - return true; - } - } - return false; - // TODO(shayba): delete the above, uncomment the below. - // SDK_INT has not yet ramped to Baklava in all 25Q2 builds. - // return Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA; + return Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA; } static { |