From 14a85fd61e8fba2f4cfbf97dfd639d19b7adb70e Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 26 Feb 2023 22:36:13 +0100 Subject: [PATCH] Silence lint warning about constant in API 29 MediaFormat.MIMETYPE_VIDEO_AV1 has been added in API 29, but it is not a problem to inline the constant in older versions. --- server/src/main/java/com/genymobile/scrcpy/VideoCodec.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/main/java/com/genymobile/scrcpy/VideoCodec.java b/server/src/main/java/com/genymobile/scrcpy/VideoCodec.java index 809d7dbc..e19b27f0 100644 --- a/server/src/main/java/com/genymobile/scrcpy/VideoCodec.java +++ b/server/src/main/java/com/genymobile/scrcpy/VideoCodec.java @@ -1,10 +1,12 @@ package com.genymobile.scrcpy; +import android.annotation.SuppressLint; import android.media.MediaFormat; public enum VideoCodec { H264(0x68_32_36_34, "h264", MediaFormat.MIMETYPE_VIDEO_AVC), H265(0x68_32_36_35, "h265", MediaFormat.MIMETYPE_VIDEO_HEVC), + @SuppressLint("InlinedApi") // introduced in API 21 AV1(0x00_61_76_31, "av1", MediaFormat.MIMETYPE_VIDEO_AV1); private final int id; // 4-byte ASCII representation of the name