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

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

Merge "Add Build.isAtLeastO"

parents a8dc6a3b 3b8b07c8
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -840,4 +840,16 @@ public class Build {
            return -1;
            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;
    }
}
}