Commit 20adcbb0 authored by Nate Fischer's avatar Nate Fischer Committed by Chromium LUCI CQ

Android: inline deprecated BuildInfo methods (/media)

No change to logic. This inlines BuildInfo.isAtLeast{Q,R} and
BuildInfo.targetsAtLeast{Q,R} (and their C++ equivalents) in
/media.

The methods themselves will be removed in a follow-up CL once all call
sites have been removed.

This CL was uploaded by git cl split.

R=chcunningham@chromium.org

Bug: 1106920
Test: autoninja -C out/Default monochrome_public_apk
Change-Id: I50025fc53dd66d4c747b623a6c4fa8b9a9c0c068
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575332
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833967}
parent f5f41212
...@@ -18,7 +18,6 @@ import android.os.Build; ...@@ -18,7 +18,6 @@ import android.os.Build;
import androidx.annotation.IntDef; import androidx.annotation.IntDef;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import org.chromium.base.BuildInfo;
import org.chromium.base.Log; import org.chromium.base.Log;
import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace; import org.chromium.base.annotations.JNINamespace;
...@@ -427,7 +426,7 @@ class MediaCodecUtil { ...@@ -427,7 +426,7 @@ class MediaCodecUtil {
return false; return false;
} }
} else if (mime.equals(MimeTypes.VIDEO_AV1)) { } else if (mime.equals(MimeTypes.VIDEO_AV1)) {
if (!BuildInfo.isAtLeastQ()) return false; if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) return false;
} }
// ************************************************************* // *************************************************************
// *** DO NOT ADD ANY NEW CODECS WITHOUT UPDATING MIME_UTIL. *** // *** DO NOT ADD ANY NEW CODECS WITHOUT UPDATING MIME_UTIL. ***
......
...@@ -300,7 +300,8 @@ bool IsDefaultSupportedVideoType(const VideoType& type) { ...@@ -300,7 +300,8 @@ bool IsDefaultSupportedVideoType(const VideoType& type) {
return IsColorSpaceSupported(type.color_space); return IsColorSpaceSupported(type.color_space);
#else #else
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
if (base::android::BuildInfo::GetInstance()->is_at_least_q() && if (base::android::BuildInfo::GetInstance()->sdk_int() >=
base::android::SDK_VERSION_Q &&
IsColorSpaceSupported(type.color_space)) { IsColorSpaceSupported(type.color_space)) {
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment