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

Commit ec6a0334 authored by Shai Barack's avatar Shai Barack Committed by Android (Google) Code Review
Browse files

Merge "Improve Baklava detection in TestableLooper" into main

parents 5a02366b df18fae6
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 {