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

Commit d43d7057 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Add Build.isAtLeastO""

parents 1662b38f 7eda6447
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -349,7 +349,9 @@ final class BackStackRecord extends FragmentTransaction implements

    public BackStackRecord(FragmentManagerImpl manager) {
        mManager = manager;
        mAllowOptimization = Build.isAtLeastO();
        int targetSdkVersion = manager.mHost.getContext().getApplicationInfo().targetSdkVersion;
        // TODO: make the check N_MR1 or O
        mAllowOptimization = targetSdkVersion > Build.VERSION_CODES.N;
    }

    public int getId() {
+0 −12
Original line number Diff line number Diff line
@@ -924,16 +924,4 @@ public class Build {
            return -1;
        }
    }

    /**
     * Check if the device is running on the Android O release or newer.
     *
     * @return {@code true} if O APIs are available for use
     *
     * @hide
     */
    public static boolean isAtLeastO() {
        return !"REL".equals(VERSION.CODENAME)
                && "O".compareTo(VERSION.CODENAME) <= 0;
    }
}