protected static boolean isAtLeastPreReleaseCodename(@NonNull String codename,
                                                         @NonNull String buildCodename) {

        // Special case "REL", which means the build is not a pre-release build.
        if ("REL".equals(buildCodename)) {
            return false;
        }

        // Otherwise lexically compare them.  Return true if the build codename is equal to or
        // greater than the requested codename.
        final String buildCodenameUpper = buildCodename.toUpperCase(Locale.ROOT);
        final String codenameUpper = codename.toUpperCase(Locale.ROOT);
        return buildCodenameUpper.compareTo(codenameUpper) >= 0;
    }
Checks if the codename is a matching or higher version than the given build value.

@param codename      the requested build codename, e.g. {@code "O"} or {@code "OMR1"}
@param buildCodename the value of {@link VERSION#CODENAME}
@return {@code true} if APIs from the requested codename are available in the build.
@hide
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/BuildCompat.java