@@ -0,0 +1,2423 @@
+/*%0A * Copyright 2021 The Android Open Source Project%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.google.android.exoplayer2.analytics;%0A%0Aimport static com.google.android.exoplayer2.util.Assertions.checkNotNull;%0Aimport static com.google.android.exoplayer2.util.Assertions.checkState;%0A%0Aimport android.media.metrics.LogSessionId;%0Aimport androidx.annotation.Nullable;%0Aimport androidx.annotation.RequiresApi;%0Aimport com.google.android.exoplayer2.util.Util;%0A%0A/** Identifier for a player instance. */%0Apublic final class PlayerId %7B%0A%0A  /**%0A   * A player identifier with unset default values that can be used as a placeholder or for testing.%0A   */%0A  public static final PlayerId UNSET =%0A      Util.SDK_INT %3C 31 ? new PlayerId() : new PlayerId(LogSessionIdApi31.UNSET);%0A%0A  @Nullable private final LogSessionIdApi31 logSessionIdApi31;%0A%0A  /** Creates an instance for API &lt; 31. */%0A  public PlayerId() %7B%0A    this(/* logSessionIdApi31= */ (LogSessionIdApi31) null);%0A    checkState(Util.SDK_INT %3C 31);%0A  %7D%0A%0A  /**%0A   * Creates an instance for API &ge; 31.%0A   *%0A   * @param logSessionId The %7B@link LogSessionId%7D used for this player.%0A   */%0A  @RequiresApi(31)%0A  public PlayerId(LogSessionId logSessionId) %7B%0A    this(new LogSessionIdApi31(logSessionId));%0A  %7D%0A%0A  private PlayerId(@Nullable LogSessionIdApi31 logSessionIdApi31) %7B%0A    this.logSessionIdApi31 = logSessionIdApi31;%0A  %7D%0A%0A  /** Returns the %7B@link LogSessionId%7D for this player instance. */%0A  @RequiresApi(31)%0A  public LogSessionId getLogSessionId() %7B%0A    return checkNotNull(logSessionIdApi31).logSessionId;%0A  %7D%0A%0A  @RequiresApi(31)%0A  private static final class LogSessionIdApi31 %7B%0A%0A    public static final LogSessionIdApi31 UNSET =%0A        new LogSessionIdApi31(LogSessionId.LOG_SESSION_ID_NONE);%0A%0A    public final LogSessionId logSessionId;%0A%0A    public LogSessionIdApi31(LogSessionId logSessionId) %7B%0A      this.logSessionId = logSessionId;%0A    %7D%0A  %7D%0A%7D%0A

Create wrapper class for LogSessionId.