Skip to content

Commit 75661f4

Browse files
runningcodeclaude
andcommitted
feat(android): Compile against Android SDK 37
Bump compileSdk and targetSdk to 37 (Android 17). Also handle the now-nullable MediaCodecInfo.getVideoCapabilities() in SimpleVideoEncoder: the API 37 android.jar annotates it @nullable, which otherwise fails Kotlin compilation. The access is already inside a try/catch, so behavior is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 61ba1d5 commit 75661f4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ springboot4 = "4.0.0"
4545
sqldelight = "2.3.2"
4646

4747
# Android
48-
targetSdk = "36"
49-
compileSdk = "36"
48+
targetSdk = "37"
49+
compileSdk = "37"
5050
minSdk = "21"
5151

5252
[plugins]

sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ internal class SimpleVideoEncoder(
8181
val videoCapabilities =
8282
mediaCodec.codecInfo.getCapabilitiesForType(muxerConfig.mimeType).videoCapabilities
8383

84-
if (!videoCapabilities.bitrateRange.contains(bitRate)) {
84+
if (videoCapabilities != null && !videoCapabilities.bitrateRange.contains(bitRate)) {
8585
options.logger.log(
8686
DEBUG,
8787
"Encoder doesn't support the provided bitRate: $bitRate, the value will be clamped to the closest one",

0 commit comments

Comments
 (0)