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

Commit 3fab0eab authored by Shai Barack's avatar Shai Barack
Browse files

Improve Baklava detection in TestLooper

Flag: EXEMPT test-only code
Bug: 379472827
Change-Id: Idf4fb68eba9b50a798455e8e32bede20b34fabdf
parent 98567c3c
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -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 {