Remove @DoNotInline
annotations
This is no longer needed now our `compileSdk` implies a new-enough AGP which does this out-lining automatically via R8. See also https://issuetracker.google.com/345472586#comment7 There's no plan to remove the `ApiXXX` classes, but no new ones need to be added. PiperOrigin-RevId: 675940634
This commit is contained in:
parent
2951a2599c
commit
3e8ecbf564
@ -3,6 +3,20 @@
|
||||
### Unreleased changes
|
||||
|
||||
* Common Library:
|
||||
* Remove `@DoNotInline` annotations from manually out-of-lined inner
|
||||
classes designed to avoid
|
||||
[runtime class verification failures](https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md).
|
||||
Recent versions of [R8](https://developer.android.com/build/shrink-code)
|
||||
now automatically out-of-line calls like these to avoid the runtime
|
||||
failures (so the manual out-of-lining is no longer required). All Gradle
|
||||
users of the library must already be a using a version of the Android
|
||||
Gradle Plugin that uses a version of R8 which does this,
|
||||
[due to `compileSdk = 35`](https://issuetracker.google.com/345472586#comment7).
|
||||
Users of the library with non-Gradle build systems will need to ensure
|
||||
their R8-equivalent shrinking/obfuscating step does a similar automatic
|
||||
out-of-lining process in order to avoid runtime class verification
|
||||
failures. This change has
|
||||
[already been done in other AndroidX libraries](http://r.android.com/3156141).
|
||||
* ExoPlayer:
|
||||
* Fix `MediaCodec.CryptoException` sometimes being reported as an
|
||||
"unexpected runtime error" when `MediaCodec` is operated in asynchronous
|
||||
|
@ -45,7 +45,6 @@ import android.widget.ExpandableListView.OnChildClickListener;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.OptIn;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -667,7 +666,6 @@ public class SampleChooserActivity extends AppCompatActivity
|
||||
@RequiresApi(33)
|
||||
private static class Api33 {
|
||||
|
||||
@DoNotInline
|
||||
public static String getPostNotificationPermissionString() {
|
||||
return Manifest.permission.POST_NOTIFICATIONS;
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.TextureView;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntRange;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -1586,7 +1585,6 @@ public final class CastPlayer extends BasePlayer {
|
||||
}
|
||||
|
||||
/** Acquires necessary resources and registers callbacks. */
|
||||
@DoNotInline
|
||||
public void initialize() {
|
||||
mediaRouter2.registerTransferCallback(handler::post, transferCallback);
|
||||
// We need at least one route callback registered in order to get transfer callback updates.
|
||||
@ -1601,7 +1599,6 @@ public final class CastPlayer extends BasePlayer {
|
||||
* Releases any resources acquired in {@link #initialize()} and unregisters any registered
|
||||
* callbacks.
|
||||
*/
|
||||
@DoNotInline
|
||||
public void release() {
|
||||
mediaRouter2.unregisterTransferCallback(transferCallback);
|
||||
mediaRouter2.unregisterRouteCallback(emptyRouteCallback);
|
||||
@ -1609,7 +1606,6 @@ public final class CastPlayer extends BasePlayer {
|
||||
}
|
||||
|
||||
/** Updates the device info with an up-to-date value and notifies the listeners. */
|
||||
@DoNotInline
|
||||
private void updateDeviceInfo() {
|
||||
DeviceInfo oldDeviceInfo = deviceInfo;
|
||||
DeviceInfo newDeviceInfo = fetchDeviceInfo();
|
||||
@ -1624,7 +1620,6 @@ public final class CastPlayer extends BasePlayer {
|
||||
* Returns a {@link DeviceInfo} with the {@link RoutingController#getId() id} that corresponds
|
||||
* to the Cast session, or {@link #DEVICE_INFO_REMOTE_EMPTY} if not available.
|
||||
*/
|
||||
@DoNotInline
|
||||
public DeviceInfo fetchDeviceInfo() {
|
||||
// TODO: b/364833997 - Fetch this information from the AndroidX MediaRouter selected route
|
||||
// once the selected route id matches the controller id.
|
||||
|
@ -16,7 +16,6 @@
|
||||
package androidx.media3.common;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
@ -240,7 +239,6 @@ public final class AudioAttributes {
|
||||
|
||||
@RequiresApi(29)
|
||||
private static final class Api29 {
|
||||
@DoNotInline
|
||||
public static void setAllowedCapturePolicy(
|
||||
android.media.AudioAttributes.Builder builder,
|
||||
@C.AudioAllowedCapturePolicy int allowedCapturePolicy) {
|
||||
@ -250,7 +248,6 @@ public final class AudioAttributes {
|
||||
|
||||
@RequiresApi(32)
|
||||
private static final class Api32 {
|
||||
@DoNotInline
|
||||
public static void setSpatializationBehavior(
|
||||
android.media.AudioAttributes.Builder builder,
|
||||
@C.SpatializationBehavior int spatializationBehavior) {
|
||||
|
@ -80,7 +80,6 @@ import android.view.Display;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.WindowManager;
|
||||
import androidx.annotation.ChecksSdkIntAtLeast;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -3918,7 +3917,6 @@ public final class Util {
|
||||
@RequiresApi(29)
|
||||
private static class Api29 {
|
||||
|
||||
@DoNotInline
|
||||
public static void startForeground(
|
||||
Service mediaSessionService,
|
||||
int notificationId,
|
||||
|
@ -28,7 +28,6 @@ import android.text.Layout;
|
||||
import android.text.SpannableString;
|
||||
import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
@ -142,7 +141,6 @@ public abstract class TextOverlay extends BitmapOverlay {
|
||||
|
||||
@RequiresApi(23)
|
||||
private static final class Api23 {
|
||||
@DoNotInline
|
||||
public static StaticLayout getStaticLayout(
|
||||
SpannableString text, TextPaint textPaint, int width) {
|
||||
return StaticLayout.Builder.obtain(
|
||||
|
@ -57,7 +57,6 @@ import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.TextureView;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.AudioAttributes;
|
||||
@ -3402,7 +3401,6 @@ import java.util.concurrent.TimeoutException;
|
||||
private static final class Api31 {
|
||||
private Api31() {}
|
||||
|
||||
@DoNotInline
|
||||
public static PlayerId registerMediaMetricsListener(
|
||||
Context context, ExoPlayerImpl player, boolean usePlatformDiagnostics, String playerName) {
|
||||
@Nullable MediaMetricsListener listener = MediaMetricsListener.create(context);
|
||||
@ -3421,7 +3419,6 @@ import java.util.concurrent.TimeoutException;
|
||||
private static final class Api23 {
|
||||
private Api23() {}
|
||||
|
||||
@DoNotInline
|
||||
public static boolean isSuitableExternalAudioOutputPresentInAudioDeviceInfoList(
|
||||
Context context, AudioDeviceInfo[] audioDeviceInfos) {
|
||||
if (!Util.isWear(context)) {
|
||||
@ -3454,7 +3451,6 @@ import java.util.concurrent.TimeoutException;
|
||||
return false;
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void registerAudioDeviceCallback(
|
||||
AudioManager audioManager, AudioDeviceCallback audioDeviceCallback, Handler handler) {
|
||||
audioManager.registerAudioDeviceCallback(audioDeviceCallback, handler);
|
||||
|
@ -32,7 +32,6 @@ import android.net.Uri;
|
||||
import android.provider.Settings.Global;
|
||||
import android.util.Pair;
|
||||
import android.util.SparseArray;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
@ -544,7 +543,6 @@ public final class AudioCapabilities {
|
||||
private static final class Api23 {
|
||||
private Api23() {}
|
||||
|
||||
@DoNotInline
|
||||
public static boolean isBluetoothConnected(
|
||||
AudioManager audioManager, @Nullable AudioDeviceInfoApi23 currentDevice) {
|
||||
// Check the current device if known or all devices otherwise.
|
||||
@ -570,7 +568,6 @@ public final class AudioCapabilities {
|
||||
* AudioDeviceInfo#TYPE_BLE_HEADSET} and {@link AudioDeviceInfo#TYPE_BLE_SPEAKER} are added from
|
||||
* API 31. And the type {@link AudioDeviceInfo#TYPE_BLE_BROADCAST} is added from API 33.
|
||||
*/
|
||||
@DoNotInline
|
||||
private static ImmutableSet<Integer> getAllBluetoothDeviceTypes() {
|
||||
ImmutableSet.Builder<Integer> allBluetoothDeviceTypes =
|
||||
new ImmutableSet.Builder<Integer>()
|
||||
@ -591,7 +588,6 @@ public final class AudioCapabilities {
|
||||
|
||||
private Api29() {}
|
||||
|
||||
@DoNotInline
|
||||
public static ImmutableList<Integer> getDirectPlaybackSupportedEncodings(
|
||||
AudioAttributes audioAttributes) {
|
||||
ImmutableList.Builder<Integer> supportedEncodingsListBuilder = ImmutableList.builder();
|
||||
@ -618,7 +614,6 @@ public final class AudioCapabilities {
|
||||
* Returns the maximum number of channels supported for passthrough playback of audio in the
|
||||
* given format, or {@code 0} if the format is unsupported.
|
||||
*/
|
||||
@DoNotInline
|
||||
public static int getMaxSupportedChannelCountForPassthrough(
|
||||
@C.Encoding int encoding, int sampleRate, AudioAttributes audioAttributes) {
|
||||
// TODO(internal b/234351617): Query supported channel masks directly once it's supported,
|
||||
@ -648,7 +643,6 @@ public final class AudioCapabilities {
|
||||
|
||||
private Api33() {}
|
||||
|
||||
@DoNotInline
|
||||
public static AudioCapabilities getCapabilitiesInternalForDirectPlayback(
|
||||
AudioManager audioManager, AudioAttributes audioAttributes) {
|
||||
List<android.media.AudioProfile> directAudioProfiles =
|
||||
@ -658,7 +652,6 @@ public final class AudioCapabilities {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static AudioDeviceInfoApi23 getDefaultRoutedDeviceForAttributes(
|
||||
AudioManager audioManager, AudioAttributes audioAttributes) {
|
||||
List<AudioDeviceInfo> audioDevices;
|
||||
|
@ -28,7 +28,6 @@ import android.media.AudioDeviceInfo;
|
||||
import android.media.AudioManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.AudioAttributes;
|
||||
@ -259,14 +258,12 @@ public final class AudioCapabilitiesReceiver {
|
||||
@RequiresApi(23)
|
||||
private static final class Api23 {
|
||||
|
||||
@DoNotInline
|
||||
public static void registerAudioDeviceCallback(
|
||||
Context context, AudioDeviceCallback callback, Handler handler) {
|
||||
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
checkNotNull(audioManager).registerAudioDeviceCallback(callback, handler);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void unregisterAudioDeviceCallback(
|
||||
Context context, AudioDeviceCallback callback) {
|
||||
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
|
@ -28,7 +28,6 @@ import android.media.AudioDeviceInfo;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -887,7 +886,6 @@ public abstract class DecoderAudioRenderer<
|
||||
private static final class Api23 {
|
||||
private Api23() {}
|
||||
|
||||
@DoNotInline
|
||||
public static void setAudioSinkPreferredDevice(
|
||||
AudioSink audioSink, @Nullable Object messagePayload) {
|
||||
@Nullable AudioDeviceInfo audioDeviceInfo = (AudioDeviceInfo) messagePayload;
|
||||
|
@ -20,7 +20,6 @@ import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||
import android.content.Context;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioManager;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.AudioAttributes;
|
||||
@ -138,7 +137,6 @@ public final class DefaultAudioOffloadSupportProvider
|
||||
private static final class Api29 {
|
||||
private Api29() {}
|
||||
|
||||
@DoNotInline
|
||||
public static AudioOffloadSupport getOffloadedPlaybackSupport(
|
||||
AudioFormat audioFormat,
|
||||
android.media.AudioAttributes audioAttributes,
|
||||
@ -157,7 +155,6 @@ public final class DefaultAudioOffloadSupportProvider
|
||||
private static final class Api31 {
|
||||
private Api31() {}
|
||||
|
||||
@DoNotInline
|
||||
public static AudioOffloadSupport getOffloadedPlaybackSupport(
|
||||
AudioFormat audioFormat,
|
||||
android.media.AudioAttributes audioAttributes,
|
||||
|
@ -37,7 +37,6 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Pair;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
@ -1914,13 +1913,11 @@ public final class DefaultAudioSink implements AudioSink {
|
||||
audioTrack.addOnRoutingChangedListener(listener, handler);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public void release() {
|
||||
audioTrack.removeOnRoutingChangedListener(checkNotNull(listener));
|
||||
listener = null;
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
private void onRoutingChanged(AudioRouting router) {
|
||||
if (listener == null) {
|
||||
// Stale event.
|
||||
@ -1984,12 +1981,10 @@ public final class DefaultAudioSink implements AudioSink {
|
||||
};
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public void register(AudioTrack audioTrack) {
|
||||
audioTrack.registerStreamEventCallback(handler::post, callback);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public void unregister(AudioTrack audioTrack) {
|
||||
audioTrack.unregisterStreamEventCallback(callback);
|
||||
handler.removeCallbacksAndMessages(/* token= */ null);
|
||||
@ -2348,7 +2343,6 @@ public final class DefaultAudioSink implements AudioSink {
|
||||
private static final class Api23 {
|
||||
private Api23() {}
|
||||
|
||||
@DoNotInline
|
||||
public static void setPreferredDeviceOnAudioTrack(
|
||||
AudioTrack audioTrack, @Nullable AudioDeviceInfoApi23 audioDeviceInfo) {
|
||||
audioTrack.setPreferredDevice(
|
||||
@ -2360,7 +2354,6 @@ public final class DefaultAudioSink implements AudioSink {
|
||||
private static final class Api31 {
|
||||
private Api31() {}
|
||||
|
||||
@DoNotInline
|
||||
public static void setLogSessionIdOnAudioTrack(AudioTrack audioTrack, PlayerId playerId) {
|
||||
LogSessionId logSessionId = playerId.getLogSessionId();
|
||||
if (!logSessionId.equals(LogSessionId.LOG_SESSION_ID_NONE)) {
|
||||
|
@ -31,7 +31,6 @@ import android.media.MediaFormat;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.AudioAttributes;
|
||||
@ -1157,7 +1156,6 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
|
||||
private static final class Api23 {
|
||||
private Api23() {}
|
||||
|
||||
@DoNotInline
|
||||
public static void setAudioSinkPreferredDevice(
|
||||
AudioSink audioSink, @Nullable Object messagePayload) {
|
||||
@Nullable AudioDeviceInfo audioDeviceInfo = (AudioDeviceInfo) messagePayload;
|
||||
|
@ -26,7 +26,6 @@ import android.media.MediaDrm;
|
||||
import android.media.MediaDrmResetException;
|
||||
import android.media.NotProvisionedException;
|
||||
import android.media.ResourceBusyException;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -221,7 +220,6 @@ public final class DrmUtil {
|
||||
@RequiresApi(23)
|
||||
private static final class Api23 {
|
||||
|
||||
@DoNotInline
|
||||
public static boolean isMediaDrmResetException(@Nullable Throwable throwable) {
|
||||
return throwable instanceof MediaDrmResetException;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ import android.media.UnsupportedSchemeException;
|
||||
import android.media.metrics.LogSessionId;
|
||||
import android.os.PersistableBundle;
|
||||
import android.text.TextUtils;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.C;
|
||||
@ -591,13 +590,11 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
|
||||
private static class Api31 {
|
||||
private Api31() {}
|
||||
|
||||
@DoNotInline
|
||||
public static boolean requiresSecureDecoder(
|
||||
MediaDrm mediaDrm, String mimeType, int securityLevel) {
|
||||
return mediaDrm.requiresSecureDecoder(mimeType, securityLevel);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void setLogSessionIdOnMediaDrmSession(
|
||||
MediaDrm mediaDrm, byte[] drmSessionId, PlayerId playerId) {
|
||||
LogSessionId logSessionId = playerId.getLogSessionId();
|
||||
|
@ -21,7 +21,6 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
|
||||
import android.media.LoudnessCodecController.OnLoudnessCodecUpdateListener;
|
||||
import android.media.MediaCodec;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
@ -74,7 +73,6 @@ public final class LoudnessCodecController {
|
||||
*
|
||||
* @param audioSessionId The audio session ID.
|
||||
*/
|
||||
@DoNotInline
|
||||
public void setAudioSessionId(int audioSessionId) {
|
||||
if (loudnessCodecController != null) {
|
||||
loudnessCodecController.close();
|
||||
@ -104,7 +102,6 @@ public final class LoudnessCodecController {
|
||||
*
|
||||
* @param mediaCodec A {@link MediaCodec}.
|
||||
*/
|
||||
@DoNotInline
|
||||
public void addMediaCodec(MediaCodec mediaCodec) {
|
||||
if (loudnessCodecController != null && !loudnessCodecController.addMediaCodec(mediaCodec)) {
|
||||
// Don't add codec if the existing loudness controller can't handle it.
|
||||
@ -118,7 +115,6 @@ public final class LoudnessCodecController {
|
||||
*
|
||||
* @param mediaCodec A {@link MediaCodec}.
|
||||
*/
|
||||
@DoNotInline
|
||||
public void removeMediaCodec(MediaCodec mediaCodec) {
|
||||
boolean removedCodec = mediaCodecs.remove(mediaCodec);
|
||||
if (removedCodec && loudnessCodecController != null) {
|
||||
@ -127,7 +123,6 @@ public final class LoudnessCodecController {
|
||||
}
|
||||
|
||||
/** Releases the loudness controller. */
|
||||
@DoNotInline
|
||||
public void release() {
|
||||
mediaCodecs.clear();
|
||||
if (loudnessCodecController != null) {
|
||||
|
@ -19,7 +19,6 @@ import static java.lang.annotation.ElementType.TYPE_USE;
|
||||
|
||||
import android.media.MediaCodecInfo.VideoCapabilities;
|
||||
import android.media.MediaCodecInfo.VideoCapabilities.PerformancePoint;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.Format;
|
||||
@ -96,7 +95,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
|
||||
@RequiresApi(29)
|
||||
private static final class Api29 {
|
||||
@DoNotInline
|
||||
public static @PerformancePointCoverageResult int areResolutionAndFrameRateCovered(
|
||||
VideoCapabilities videoCapabilities, int width, int height, double frameRate) {
|
||||
List<PerformancePoint> performancePointList =
|
||||
|
@ -43,7 +43,6 @@ import android.os.Bundle;
|
||||
import android.os.SystemClock;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.CheckResult;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -2649,7 +2648,6 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||
private static final class Api31 {
|
||||
private Api31() {}
|
||||
|
||||
@DoNotInline
|
||||
public static void setLogSessionIdToMediaCodecFormat(
|
||||
MediaCodecAdapter.Configuration codecConfiguration, PlayerId playerId) {
|
||||
LogSessionId logSessionId = playerId.getLogSessionId();
|
||||
|
@ -21,7 +21,6 @@ import android.annotation.SuppressLint;
|
||||
import android.app.Notification;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -237,7 +236,6 @@ public final class DownloadNotificationHelper {
|
||||
@RequiresApi(31)
|
||||
private static final class Api31 {
|
||||
@SuppressLint("WrongConstant") // TODO(b/254277605): remove lint suppression
|
||||
@DoNotInline
|
||||
public static void setForegroundServiceBehavior(
|
||||
NotificationCompat.Builder notificationBuilder) {
|
||||
notificationBuilder.setForegroundServiceBehavior(FOREGROUND_SERVICE_IMMEDIATE);
|
||||
|
@ -18,7 +18,6 @@ package androidx.media3.exoplayer.source.mediaparser;
|
||||
import android.media.MediaFormat;
|
||||
import android.media.MediaParser;
|
||||
import android.media.metrics.LogSessionId;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.Format;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
@ -79,7 +78,6 @@ public final class MediaParserUtil {
|
||||
private static final class Api31 {
|
||||
private Api31() {}
|
||||
|
||||
@DoNotInline
|
||||
public static void setLogSessionIdOnMediaParser(MediaParser mediaParser, PlayerId playerId) {
|
||||
LogSessionId logSessionId = playerId.getLogSessionId();
|
||||
if (!logSessionId.equals(LogSessionId.LOG_SESSION_ID_NONE)) {
|
||||
|
@ -43,7 +43,6 @@ import android.util.Pair;
|
||||
import android.view.Display;
|
||||
import android.view.Surface;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.C;
|
||||
@ -636,7 +635,6 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
||||
|
||||
@RequiresApi(26)
|
||||
private static final class Api26 {
|
||||
@DoNotInline
|
||||
public static boolean doesDisplaySupportDolbyVision(Context context) {
|
||||
boolean supportsDolbyVision = false;
|
||||
DisplayManager displayManager =
|
||||
|
@ -26,7 +26,6 @@ import android.view.Choreographer;
|
||||
import android.view.Choreographer.FrameCallback;
|
||||
import android.view.Display;
|
||||
import android.view.Surface;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.media3.common.C;
|
||||
@ -428,7 +427,6 @@ public final class VideoFrameReleaseHelper {
|
||||
|
||||
@RequiresApi(30)
|
||||
private static final class Api30 {
|
||||
@DoNotInline
|
||||
public static void setSurfaceFrameRate(Surface surface, float frameRate) {
|
||||
int compatibility =
|
||||
frameRate == 0
|
||||
|
@ -32,7 +32,6 @@ import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -682,7 +681,6 @@ public class DefaultMediaNotificationProvider implements MediaNotification.Provi
|
||||
|
||||
@RequiresApi(26)
|
||||
private static class Api26 {
|
||||
@DoNotInline
|
||||
public static void createNotificationChannel(
|
||||
NotificationManager notificationManager, String channelId, String channelName) {
|
||||
NotificationChannel channel =
|
||||
@ -699,7 +697,6 @@ public class DefaultMediaNotificationProvider implements MediaNotification.Provi
|
||||
|
||||
@RequiresApi(31)
|
||||
private static class Api31 {
|
||||
@DoNotInline
|
||||
public static void setForegroundServiceBehavior(NotificationCompat.Builder builder) {
|
||||
builder.setForegroundServiceBehavior(Notification.FOREGROUND_SERVICE_IMMEDIATE);
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Build;
|
||||
import android.view.KeyEvent;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.content.ContextCompat;
|
||||
@ -257,7 +256,6 @@ public class MediaButtonReceiver extends BroadcastReceiver {
|
||||
/**
|
||||
* Returns true if the passed exception is a {@link ForegroundServiceStartNotAllowedException}.
|
||||
*/
|
||||
@DoNotInline
|
||||
public static boolean instanceOfForegroundServiceStartNotAllowedException(
|
||||
IllegalStateException e) {
|
||||
return e instanceof ForegroundServiceStartNotAllowedException;
|
||||
@ -267,7 +265,6 @@ public class MediaButtonReceiver extends BroadcastReceiver {
|
||||
* Casts the {@link IllegalStateException} to a {@link
|
||||
* ForegroundServiceStartNotAllowedException} and throws an exception if the cast fails.
|
||||
*/
|
||||
@DoNotInline
|
||||
public static ForegroundServiceStartNotAllowedException
|
||||
castToForegroundServiceStartNotAllowedException(IllegalStateException e) {
|
||||
return (ForegroundServiceStartNotAllowedException) e;
|
||||
|
@ -26,7 +26,6 @@ import android.content.pm.ServiceInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
@ -384,7 +383,6 @@ import java.util.concurrent.TimeoutException;
|
||||
@RequiresApi(24)
|
||||
private static class Api24 {
|
||||
|
||||
@DoNotInline
|
||||
public static void stopForeground(MediaSessionService service, boolean removeNotification) {
|
||||
service.stopForeground(removeNotification ? STOP_FOREGROUND_REMOVE : STOP_FOREGROUND_DETACH);
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import android.os.RemoteException;
|
||||
import android.view.KeyEvent;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -2152,7 +2151,6 @@ public class MediaSession {
|
||||
|
||||
@RequiresApi(31)
|
||||
private static final class Api31 {
|
||||
@DoNotInline
|
||||
public static boolean isActivity(PendingIntent pendingIntent) {
|
||||
return pendingIntent.isActivity();
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ import android.os.RemoteException;
|
||||
import android.os.ResultReceiver;
|
||||
import android.text.TextUtils;
|
||||
import android.view.KeyEvent;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.util.ObjectsCompat;
|
||||
@ -1482,7 +1481,6 @@ import org.checkerframework.checker.initialization.qual.Initialized;
|
||||
|
||||
@RequiresApi(31)
|
||||
private static final class Api31 {
|
||||
@DoNotInline
|
||||
public static void setMediaButtonBroadcastReceiver(
|
||||
MediaSessionCompat mediaSessionCompat, ComponentName broadcastReceiver) {
|
||||
((android.media.session.MediaSession) checkNotNull(mediaSessionCompat.getMediaSession()))
|
||||
|
@ -34,7 +34,6 @@ import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import android.os.RemoteException;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -811,7 +810,6 @@ public abstract class MediaSessionService extends Service {
|
||||
|
||||
@RequiresApi(31)
|
||||
private static final class Api31 {
|
||||
@DoNotInline
|
||||
public static boolean instanceOfForegroundServiceStartNotAllowedException(
|
||||
IllegalStateException e) {
|
||||
return e instanceof ForegroundServiceStartNotAllowedException;
|
||||
|
@ -25,7 +25,6 @@ import android.app.PendingIntent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.RemoteViews;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -454,7 +453,6 @@ public class MediaStyleNotificationHelper {
|
||||
private static class Api24Impl {
|
||||
private Api24Impl() {}
|
||||
|
||||
@DoNotInline
|
||||
public static Notification.DecoratedMediaCustomViewStyle createDecoratedMediaCustomViewStyle() {
|
||||
return new Notification.DecoratedMediaCustomViewStyle();
|
||||
}
|
||||
@ -468,7 +466,6 @@ public class MediaStyleNotificationHelper {
|
||||
// MEDIA_CONTENT_CONTROL permission is required by setRemotePlaybackInfo
|
||||
@CanIgnoreReturnValue
|
||||
@SuppressLint({"MissingPermission"})
|
||||
@DoNotInline
|
||||
public static Notification.MediaStyle setRemotePlaybackInfo(
|
||||
Notification.MediaStyle style,
|
||||
CharSequence remoteDeviceName,
|
||||
|
@ -73,7 +73,6 @@ import android.os.RemoteException;
|
||||
import android.support.v4.os.ResultReceiver;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -2471,12 +2470,10 @@ public final class MediaBrowserCompat {
|
||||
private static class Api21Impl {
|
||||
private Api21Impl() {}
|
||||
|
||||
@DoNotInline
|
||||
static MediaDescription getDescription(MediaBrowser.MediaItem item) {
|
||||
return item.getDescription();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static int getFlags(MediaBrowser.MediaItem item) {
|
||||
return item.getFlags();
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ import android.content.pm.ResolveInfo;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.RestrictTo;
|
||||
@ -378,7 +377,6 @@ public class MediaButtonReceiver extends BroadcastReceiver {
|
||||
/**
|
||||
* Returns true if the passed exception is a {@link ForegroundServiceStartNotAllowedException}.
|
||||
*/
|
||||
@DoNotInline
|
||||
public static boolean instanceOfForegroundServiceStartNotAllowedException(
|
||||
IllegalStateException e) {
|
||||
return e instanceof ForegroundServiceStartNotAllowedException;
|
||||
@ -388,7 +386,6 @@ public class MediaButtonReceiver extends BroadcastReceiver {
|
||||
* Casts the {@link IllegalStateException} to a {@link
|
||||
* ForegroundServiceStartNotAllowedException} and throws an exception if the cast fails.
|
||||
*/
|
||||
@DoNotInline
|
||||
public static ForegroundServiceStartNotAllowedException
|
||||
castToForegroundServiceStartNotAllowedException(IllegalStateException e) {
|
||||
return (ForegroundServiceStartNotAllowedException) e;
|
||||
|
@ -27,7 +27,6 @@ import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.RestrictTo;
|
||||
@ -550,89 +549,73 @@ public final class MediaDescriptionCompat implements Parcelable {
|
||||
private static class Api21Impl {
|
||||
private Api21Impl() {}
|
||||
|
||||
@DoNotInline
|
||||
static MediaDescription.Builder createBuilder() {
|
||||
return new MediaDescription.Builder();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setMediaId(MediaDescription.Builder builder, @Nullable String mediaId) {
|
||||
builder.setMediaId(mediaId);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setTitle(MediaDescription.Builder builder, @Nullable CharSequence title) {
|
||||
builder.setTitle(title);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setSubtitle(MediaDescription.Builder builder, @Nullable CharSequence subtitle) {
|
||||
builder.setSubtitle(subtitle);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setDescription(
|
||||
MediaDescription.Builder builder, @Nullable CharSequence description) {
|
||||
builder.setDescription(description);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setIconBitmap(MediaDescription.Builder builder, @Nullable Bitmap icon) {
|
||||
builder.setIconBitmap(icon);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setIconUri(MediaDescription.Builder builder, @Nullable Uri iconUri) {
|
||||
builder.setIconUri(iconUri);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setExtras(MediaDescription.Builder builder, @Nullable Bundle extras) {
|
||||
builder.setExtras(extras);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static MediaDescription build(MediaDescription.Builder builder) {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static String getMediaId(MediaDescription description) {
|
||||
return description.getMediaId();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static CharSequence getTitle(MediaDescription description) {
|
||||
return description.getTitle();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static CharSequence getSubtitle(MediaDescription description) {
|
||||
return description.getSubtitle();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static CharSequence getDescription(MediaDescription description) {
|
||||
return description.getDescription();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static Bitmap getIconBitmap(MediaDescription description) {
|
||||
return description.getIconBitmap();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static Uri getIconUri(MediaDescription description) {
|
||||
return description.getIconUri();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static Bundle getExtras(MediaDescription description) {
|
||||
return description.getExtras();
|
||||
@ -643,12 +626,10 @@ public final class MediaDescriptionCompat implements Parcelable {
|
||||
private static class Api23Impl {
|
||||
private Api23Impl() {}
|
||||
|
||||
@DoNotInline
|
||||
static void setMediaUri(MediaDescription.Builder builder, @Nullable Uri mediaUri) {
|
||||
builder.setMediaUri(mediaUri);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@Nullable
|
||||
static Uri getMediaUri(MediaDescription description) {
|
||||
return description.getMediaUri();
|
||||
|
@ -61,7 +61,6 @@ import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.ViewConfiguration;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
@ -2136,17 +2135,14 @@ public class MediaSessionCompat {
|
||||
private static class Api21Impl {
|
||||
private Api21Impl() {}
|
||||
|
||||
@DoNotInline
|
||||
static MediaSession.QueueItem createQueueItem(MediaDescription description, long id) {
|
||||
return new MediaSession.QueueItem(description, id);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static MediaDescription getDescription(MediaSession.QueueItem queueItem) {
|
||||
return queueItem.getDescription();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static long getQueueId(MediaSession.QueueItem queueItem) {
|
||||
return queueItem.getQueueId();
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ import android.os.Parcelable;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.view.KeyEvent;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.LongDef;
|
||||
import androidx.annotation.Nullable;
|
||||
@ -1405,12 +1404,10 @@ public final class PlaybackStateCompat implements Parcelable {
|
||||
private static class Api21Impl {
|
||||
private Api21Impl() {}
|
||||
|
||||
@DoNotInline
|
||||
static PlaybackState.Builder createBuilder() {
|
||||
return new PlaybackState.Builder();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setState(
|
||||
PlaybackState.Builder builder,
|
||||
int state,
|
||||
@ -1420,118 +1417,96 @@ public final class PlaybackStateCompat implements Parcelable {
|
||||
builder.setState(state, position, playbackSpeed, updateTime);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setBufferedPosition(PlaybackState.Builder builder, long bufferedPosition) {
|
||||
builder.setBufferedPosition(bufferedPosition);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setActions(PlaybackState.Builder builder, long actions) {
|
||||
builder.setActions(actions);
|
||||
}
|
||||
|
||||
@SuppressWarnings("argument.type.incompatible") // Platform class not annotated as nullable
|
||||
@DoNotInline
|
||||
static void setErrorMessage(PlaybackState.Builder builder, @Nullable CharSequence error) {
|
||||
builder.setErrorMessage(error);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void addCustomAction(
|
||||
PlaybackState.Builder builder, PlaybackState.CustomAction customAction) {
|
||||
builder.addCustomAction(customAction);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static void setActiveQueueItemId(PlaybackState.Builder builder, long id) {
|
||||
builder.setActiveQueueItemId(id);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static List<PlaybackState.CustomAction> getCustomActions(PlaybackState state) {
|
||||
return state.getCustomActions();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static PlaybackState build(PlaybackState.Builder builder) {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static int getState(PlaybackState state) {
|
||||
return state.getState();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static long getPosition(PlaybackState state) {
|
||||
return state.getPosition();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static long getBufferedPosition(PlaybackState state) {
|
||||
return state.getBufferedPosition();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static float getPlaybackSpeed(PlaybackState state) {
|
||||
return state.getPlaybackSpeed();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static long getActions(PlaybackState state) {
|
||||
return state.getActions();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
static CharSequence getErrorMessage(PlaybackState state) {
|
||||
return state.getErrorMessage();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static long getLastPositionUpdateTime(PlaybackState state) {
|
||||
return state.getLastPositionUpdateTime();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static long getActiveQueueItemId(PlaybackState state) {
|
||||
return state.getActiveQueueItemId();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static PlaybackState.CustomAction.Builder createCustomActionBuilder(
|
||||
String action, CharSequence name, int icon) {
|
||||
return new PlaybackState.CustomAction.Builder(action, name, icon);
|
||||
}
|
||||
|
||||
@SuppressWarnings("argument.type.incompatible") // Platform class not annotated as nullable
|
||||
@DoNotInline
|
||||
static void setExtras(PlaybackState.CustomAction.Builder builder, @Nullable Bundle extras) {
|
||||
builder.setExtras(extras);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static PlaybackState.CustomAction build(PlaybackState.CustomAction.Builder builder) {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
static Bundle getExtras(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getExtras();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static String getAction(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getAction();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static CharSequence getName(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getName();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
static int getIcon(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getIcon();
|
||||
}
|
||||
@ -1542,13 +1517,11 @@ public final class PlaybackStateCompat implements Parcelable {
|
||||
private Api22Impl() {}
|
||||
|
||||
@SuppressWarnings("argument.type.incompatible") // Platform class not annotated as nullable
|
||||
@DoNotInline
|
||||
static void setExtras(PlaybackState.Builder builder, @Nullable Bundle extras) {
|
||||
builder.setExtras(extras);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
static Bundle getExtras(PlaybackState state) {
|
||||
return state.getExtras();
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ import static androidx.annotation.RestrictTo.Scope.LIBRARY;
|
||||
|
||||
import android.media.VolumeProvider;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -225,7 +224,6 @@ public abstract class VolumeProviderCompat {
|
||||
private static class Api21Impl {
|
||||
private Api21Impl() {}
|
||||
|
||||
@DoNotInline
|
||||
static void setCurrentVolume(VolumeProvider volumeProvider, int currentVolume) {
|
||||
volumeProvider.setCurrentVolume(currentVolume);
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ import android.media.MediaCodec.BufferInfo;
|
||||
import android.media.MediaCrypto;
|
||||
import android.media.MediaFormat;
|
||||
import android.view.Surface;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
@ -524,7 +523,6 @@ public final class DefaultCodec implements Codec {
|
||||
|
||||
@RequiresApi(29)
|
||||
private static final class Api29 {
|
||||
@DoNotInline
|
||||
public static String getCanonicalName(MediaCodec mediaCodec) {
|
||||
return mediaCodec.getCanonicalName();
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ import android.media.MediaFormat;
|
||||
import android.util.Pair;
|
||||
import android.util.Range;
|
||||
import android.util.Size;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -457,12 +456,10 @@ public final class EncoderUtil {
|
||||
|
||||
@RequiresApi(29)
|
||||
private static final class Api29 {
|
||||
@DoNotInline
|
||||
public static boolean isHardwareAccelerated(MediaCodecInfo encoderInfo) {
|
||||
return encoderInfo.isHardwareAccelerated();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static boolean isSoftwareOnly(MediaCodecInfo encoderInfo) {
|
||||
return encoderInfo.isSoftwareOnly();
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.window.SurfaceSyncGroup;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@ -1968,7 +1967,6 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
|
||||
@RequiresApi(34)
|
||||
private static class Api34 {
|
||||
|
||||
@DoNotInline
|
||||
public static void setSurfaceLifecycleToFollowsAttachment(SurfaceView surfaceView) {
|
||||
surfaceView.setSurfaceLifecycle(SurfaceView.SURFACE_LIFECYCLE_FOLLOWS_ATTACHMENT);
|
||||
}
|
||||
@ -1979,7 +1977,6 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
|
||||
|
||||
@Nullable SurfaceSyncGroup surfaceSyncGroup;
|
||||
|
||||
@DoNotInline
|
||||
public void postRegister(
|
||||
Handler mainLooperHandler, SurfaceView surfaceView, Runnable invalidate) {
|
||||
mainLooperHandler.post(
|
||||
@ -1997,7 +1994,6 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
|
||||
});
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public void maybeMarkSyncReadyAndClear() {
|
||||
if (surfaceSyncGroup != null) {
|
||||
surfaceSyncGroup.markSyncReady();
|
||||
|
Loading…
x
Reference in New Issue
Block a user