/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.android.exoplayer2;

import android.content.Context;
import com.google.android.exoplayer2.analytics.AnalyticsCollector;
import com.google.android.exoplayer2.source.DefaultMediaSourceFactory;
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
import com.google.android.exoplayer2.trackselection.TrackSelector;
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter;
import com.google.android.exoplayer2.util.Clock;
import com.google.android.exoplayer2.util.Util;

/** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
@Deprecated
public final class ExoPlayerFactory {

  private ExoPlayerFactory() {}

  /** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
  @Deprecated
  @SuppressWarnings("deprecation")
  public static SimpleExoPlayer newSimpleInstance(Context context) {
    return newSimpleInstance(context, new DefaultTrackSelector(context));
  }

  /** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
  @Deprecated
  @SuppressWarnings("deprecation")
  public static SimpleExoPlayer newSimpleInstance(Context context, TrackSelector trackSelector) {
    return newSimpleInstance(context, new DefaultRenderersFactory(context), trackSelector);
  }

  /** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
  @Deprecated
  @SuppressWarnings("deprecation")
  public static SimpleExoPlayer newSimpleInstance(
      Context context, RenderersFactory renderersFactory, TrackSelector trackSelector) {
    return newSimpleInstance(context, renderersFactory, trackSelector, new DefaultLoadControl());
  }

  /** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
  @Deprecated
  @SuppressWarnings("deprecation")
  public static SimpleExoPlayer newSimpleInstance(
      Context context,
      RenderersFactory renderersFactory,
      TrackSelector trackSelector,
      LoadControl loadControl) {
    return new SimpleExoPlayer(
        context,
        renderersFactory,
        trackSelector,
        new DefaultMediaSourceFactory(context),
        loadControl,
        DefaultBandwidthMeter.getSingletonInstance(context),
        new AnalyticsCollector(Clock.DEFAULT),
        /* useLazyPreparation= */ true,
        Clock.DEFAULT,
        Util.getCurrentOrMainLooper());
  }

  /** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
  @Deprecated
  public static ExoPlayer newInstance(
      Context context, Renderer[] renderers, TrackSelector trackSelector, LoadControl loadControl) {
    return new ExoPlayerImpl(
        renderers,
        trackSelector,
        new DefaultMediaSourceFactory(context),
        loadControl,
        DefaultBandwidthMeter.getSingletonInstance(context),
        /* analyticsCollector= */ null,
        /* useLazyPreparation= */ true,
        SeekParameters.DEFAULT,
        new DefaultLivePlaybackSpeedControl.Builder().build(),
        ExoPlayer.DEFAULT_RELEASE_TIMEOUT_MS,
        /* pauseAtEndOfMediaItems= */ false,
        Clock.DEFAULT,
        Util.getCurrentOrMainLooper(),
        /* wrappingPlayer= */ null,
        /* additionalPermanentAvailableCommands= */ Player.Commands.EMPTY);
  }
}

@@ -827,82 +827,8 @@
 ry;%0A
-import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;%0A
 impo
@@ -882,32 +882,32 @@
 .TrackSelector;%0A
+
 import com.googl
@@ -1209,271 +1209,8 @@
 %7B%7D%0A%0A
-  /** @deprecated Use %7B@link SimpleExoPlayer.Builder%7D instead. */%0A  @Deprecated%0A  @SuppressWarnings(%22deprecation%22)%0A  public static SimpleExoPlayer newSimpleInstance(Context context) %7B%0A    return newSimpleInstance(context, new DefaultTrackSelector(context));%0A  %7D%0A%0A
   /*
@@ -2501,32 +2501,32 @@
  Clock.DEFAULT,%0A
+
         Util.get
@@ -2556,874 +2556,7 @@
 %0A  %7D
-%0A%0A  /** @deprecated Use %7B@link SimpleExoPlayer.Builder%7D instead. */%0A  @Deprecated%0A  public static ExoPlayer newInstance(%0A      Context context, Renderer%5B%5D renderers, TrackSelector trackSelector, LoadControl loadControl) %7B%0A    return new ExoPlayerImpl(%0A        renderers,%0A        trackSelector,%0A        new DefaultMediaSourceFactory(context),%0A        loadControl,%0A        DefaultBandwidthMeter.getSingletonInstance(context),%0A        /* analyticsCollector= */ null,%0A        /* useLazyPreparation= */ true,%0A        SeekParameters.DEFAULT,%0A        new DefaultLivePlaybackSpeedControl.Builder().build(),%0A        ExoPlayer.DEFAULT_RELEASE_TIMEOUT_MS,%0A        /* pauseAtEndOfMediaItems= */ false,%0A        Clock.DEFAULT,%0A        Util.getCurrentOrMainLooper(),%0A        /* wrappingPlayer= */ null,%0A        /* additionalPermanentAvailableCommands= */ Player.Commands.EMPTY);%0A  %7D
 %0A%7D%0A

Remove more deprecated methods from ExoPlayerFactory