Update compileSdk to 35

This should have no influence on app behavior and other policies
and just allows code to depend on new API 35 platform symbols.

PiperOrigin-RevId: 652414026
This commit is contained in:
tonihei 2024-07-15 02:42:55 -07:00 committed by Copybara-Service
parent 268c8cf6a2
commit c510ab81bb
5 changed files with 7 additions and 15 deletions

View File

@ -21,7 +21,7 @@ project.ext {
// Upgrading this requires [Internal ref: b/193254928] to be fixed, or some // Upgrading this requires [Internal ref: b/193254928] to be fixed, or some
// additional robolectric config. // additional robolectric config.
targetSdkVersion = 30 targetSdkVersion = 30
compileSdkVersion = 34 compileSdkVersion = 35
dexmakerVersion = '2.28.3' dexmakerVersion = '2.28.3'
// Use the same JUnit version as the Android repo: // Use the same JUnit version as the Android repo:
// https://cs.android.com/android/platform/superproject/main/+/main:external/junit/METADATA // https://cs.android.com/android/platform/superproject/main/+/main:external/junit/METADATA

View File

@ -969,8 +969,7 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
mediaFormat.setInteger(MediaFormat.KEY_MAX_OUTPUT_CHANNEL_COUNT, 99); mediaFormat.setInteger(MediaFormat.KEY_MAX_OUTPUT_CHANNEL_COUNT, 99);
} }
if (Util.SDK_INT >= 35) { if (Util.SDK_INT >= 35) {
// TODO: b/333552477 - Use MediaFormat.KEY_IMPORTANCE once compileSdk >= 35 mediaFormat.setInteger(MediaFormat.KEY_IMPORTANCE, max(0, -rendererPriority));
mediaFormat.setInteger("importance", max(0, -rendererPriority));
} }
return mediaFormat; return mediaFormat;
} }
@ -983,8 +982,7 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
} }
if (Util.SDK_INT >= 35) { if (Util.SDK_INT >= 35) {
Bundle codecParameters = new Bundle(); Bundle codecParameters = new Bundle();
// TODO: b/333552477 - Use MediaFormat.KEY_IMPORTANCE once compileSdk >= 35 codecParameters.putInt(MediaFormat.KEY_IMPORTANCE, max(0, -rendererPriority));
codecParameters.putInt("importance", max(0, -rendererPriority));
codec.setParameters(codecParameters); codec.setParameters(codecParameters);
} }
} }

View File

@ -1883,8 +1883,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
} }
if (Util.SDK_INT >= 35) { if (Util.SDK_INT >= 35) {
Bundle codecParameters = new Bundle(); Bundle codecParameters = new Bundle();
// TODO: b/333552477 - Use MediaFormat.KEY_IMPORTANCE once compileSdk >= 35 codecParameters.putInt(MediaFormat.KEY_IMPORTANCE, max(0, -rendererPriority));
codecParameters.putInt("importance", max(0, -rendererPriority));
codec.setParameters(codecParameters); codec.setParameters(codecParameters);
} }
} }
@ -2020,8 +2019,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
configureTunnelingV21(mediaFormat, tunnelingAudioSessionId); configureTunnelingV21(mediaFormat, tunnelingAudioSessionId);
} }
if (Util.SDK_INT >= 35) { if (Util.SDK_INT >= 35) {
// TODO: b/333552477 - Use MediaFormat.KEY_IMPORTANCE once compileSdk >= 35 mediaFormat.setInteger(MediaFormat.KEY_IMPORTANCE, max(0, -rendererPriority));
mediaFormat.setInteger("importance", max(0, -rendererPriority));
} }
return mediaFormat; return mediaFormat;
} }

View File

@ -241,9 +241,7 @@ public final class DefaultDecoderFactory implements Codec.DecoderFactory {
} }
if (SDK_INT >= 35) { if (SDK_INT >= 35) {
// TODO: b/333552477 - Redefinition of MediaFormat.KEY_IMPORTANCE, remove after API35 is mediaFormat.setInteger(MediaFormat.KEY_IMPORTANCE, max(0, -codecPriority));
// released.
mediaFormat.setInteger("importance", max(0, -codecPriority));
} }
return createCodecForMediaFormat( return createCodecForMediaFormat(

View File

@ -360,9 +360,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
} }
if (Util.SDK_INT >= 35) { if (Util.SDK_INT >= 35) {
// TODO: b/333552477 - Redefinition of MediaFormat.KEY_IMPORTANCE, remove after API35 is mediaFormat.setInteger(MediaFormat.KEY_IMPORTANCE, max(0, -codecPriority));
// released.
mediaFormat.setInteger("importance", max(0, -codecPriority));
} }
return new DefaultCodec( return new DefaultCodec(