Remove unused and redundant code.

This commit is contained in:
TobiGr 2020-09-01 17:39:06 +02:00
parent bfdc215c65
commit c66c81294e
4 changed files with 8 additions and 9 deletions

View File

@ -6,7 +6,7 @@ import androidx.annotation.NonNull;
import androidx.room.migration.Migration;
import androidx.sqlite.db.SupportSQLiteDatabase;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.MainActivity;
public final class Migrations {
public static final int DB_VER_1 = 1;
@ -14,7 +14,7 @@ public final class Migrations {
public static final int DB_VER_3 = 3;
private static final String TAG = Migrations.class.getName();
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
public static final boolean DEBUG = MainActivity.DEBUG;
public static final Migration MIGRATION_1_2 = new Migration(DB_VER_1, DB_VER_2) {
@Override

View File

@ -54,8 +54,8 @@ import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.DownloaderImpl;
import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.local.history.HistoryRecordManager;
@ -98,7 +98,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
@SuppressWarnings({"WeakerAccess"})
public abstract class BasePlayer implements
Player.EventListener, PlaybackListener, ImageLoadingListener {
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
public static final boolean DEBUG = MainActivity.DEBUG;
@NonNull
public static final String TAG = "BasePlayer";
@ -880,7 +880,6 @@ public abstract class BasePlayer implements
}
setRecovery();
final Throwable cause = error.getCause();
if (error instanceof BehindLiveWindowException) {
reload();
} else {

View File

@ -7,7 +7,7 @@ import androidx.annotation.Nullable;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.player.playqueue.events.AppendEvent;
import org.schabi.newpipe.player.playqueue.events.ErrorEvent;
import org.schabi.newpipe.player.playqueue.events.InitEvent;
@ -44,7 +44,7 @@ import io.reactivex.subjects.BehaviorSubject;
*/
public abstract class PlayQueue implements Serializable {
private final String TAG = "PlayQueue@" + Integer.toHexString(hashCode());
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
public static final boolean DEBUG = MainActivity.DEBUG;
private ArrayList<PlayQueueItem> backup;
private ArrayList<PlayQueueItem> streams;

View File

@ -4,12 +4,12 @@ import android.os.Bundle;
import androidx.preference.Preference;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.CheckForNewAppVersionTask;
import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.R;
public class MainSettingsFragment extends BasePreferenceFragment {
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
public static final boolean DEBUG = MainActivity.DEBUG;
@Override
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) {