Skip to content

Commit

Permalink
Add missing @DoNotInline annotations.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 411041225
  • Loading branch information
tonihei authored and icbaker committed Nov 19, 2021
1 parent 48118f3 commit e935e03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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;
Expand Down Expand Up @@ -1879,6 +1880,7 @@ public Timeline getTimeline() {
private static final class Api31 {
private Api31() {}

@DoNotInline
public static PlayerId createPlayerId() {
// TODO: Create a MediaMetricsListener and obtain LogSessionId from it.
return new PlayerId(LogSessionId.LOG_SESSION_ID_NONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import android.os.Handler;
import android.os.SystemClock;
import android.util.Pair;
import androidx.annotation.DoNotInline;
import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
Expand Down Expand Up @@ -2242,6 +2243,7 @@ public void clear() {
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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
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;
Expand Down Expand Up @@ -2433,6 +2434,7 @@ private static boolean codecNeedsMonoChannelCountWorkaround(String name, Format
private static final class Api31 {
private Api31() {}

@DoNotInline
public static void setLogSessionIdToMediaCodecFormat(
MediaCodecAdapter.Configuration codecConfiguration, PlayerId playerId) {
LogSessionId logSessionId = playerId.getLogSessionId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
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;
Expand Down Expand Up @@ -78,6 +79,7 @@ public static void setLogSessionIdOnMediaParser(MediaParser mediaParser, PlayerI
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)) {
Expand Down

0 comments on commit e935e03

Please sign in to comment.