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

Commit df18fae6 authored by Shai Barack's avatar Shai Barack
Browse files

Improve Baklava detection in TestableLooper

Flag: EXEMPT test-only code
Bug: 379472827
Change-Id: I25ee7d044452c67b24132850ae39776914da168a
parent 98567c3c
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -75,16 +75,7 @@ public class TestableLooper {
     * 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 {