diff --git a/README.md b/README.md
index b154fad58..a171823d5 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
Screenshots • Description • Features • Contribution • Donate • License
Website • Blog • Press
-WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR TERMS OF CONDITIONS.
+**WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR TERMS OF CONDITIONS.**
## Screenshots
@@ -29,6 +29,8 @@ WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR
[](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_8.png)
[](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_9.png)
[](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_10.png)
+[](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_11.png)
+[](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_12.png)
## Description
@@ -61,11 +63,11 @@ NewPipe does not use any Google framework libraries, or the YouTube API. It only
* Queuing videos
* Local playlists
* Subtitles
-* Multi-service support (eg. SoundCloud in NewPipe Beta)
+* Multi-service support (eg. SoundCloud \[beta\])
+* Livestream support
### Coming Features
-* Livestream support
* Cast to UPnP and Cast
* Show comments
* ... and many more
diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java
index f436a26b8..dfce8f100 100644
--- a/app/src/main/java/org/schabi/newpipe/App.java
+++ b/app/src/main/java/org/schabi/newpipe/App.java
@@ -106,7 +106,7 @@ public class App extends Application {
// https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling
RxJavaPlugins.setErrorHandler(new Consumer() {
@Override
- public void accept(@NonNull Throwable throwable) throws Exception {
+ public void accept(@NonNull Throwable throwable) {
Log.e(TAG, "RxJavaPlugins.ErrorHandler called with -> : " +
"throwable = [" + throwable.getClass().getName() + "]");
diff --git a/app/src/main/java/org/schabi/newpipe/BaseFragment.java b/app/src/main/java/org/schabi/newpipe/BaseFragment.java
index b125ab02f..4e4cdcc0d 100644
--- a/app/src/main/java/org/schabi/newpipe/BaseFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/BaseFragment.java
@@ -12,14 +12,12 @@ import android.view.View;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.squareup.leakcanary.RefWatcher;
-import org.schabi.newpipe.report.UserAction;
-
import icepick.Icepick;
import icepick.State;
public abstract class BaseFragment extends Fragment {
protected final String TAG = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
- protected boolean DEBUG = MainActivity.DEBUG;
+ protected final boolean DEBUG = MainActivity.DEBUG;
protected AppCompatActivity activity;
public static final ImageLoader imageLoader = ImageLoader.getInstance();
diff --git a/app/src/main/java/org/schabi/newpipe/Downloader.java b/app/src/main/java/org/schabi/newpipe/Downloader.java
index 17dc5859d..68f7e080f 100644
--- a/app/src/main/java/org/schabi/newpipe/Downloader.java
+++ b/app/src/main/java/org/schabi/newpipe/Downloader.java
@@ -43,7 +43,7 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
private static Downloader instance;
private String mCookies;
- private OkHttpClient client;
+ private final OkHttpClient client;
private Downloader(OkHttpClient.Builder builder) {
this.client = builder
diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java
index 7c77bff3d..a9f2e9622 100644
--- a/app/src/main/java/org/schabi/newpipe/MainActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java
@@ -23,7 +23,6 @@ package org.schabi.newpipe;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
-import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
@@ -66,8 +65,6 @@ import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.StateSaver;
import org.schabi.newpipe.util.ThemeHelper;
-import static org.schabi.newpipe.extractor.InfoItem.InfoType.PLAYLIST;
-
public class MainActivity extends AppCompatActivity {
private static final String TAG = "MainActivity";
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
diff --git a/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java b/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java
index a4e6730da..74c818bf9 100644
--- a/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java
@@ -85,7 +85,7 @@ public class ReCaptchaActivity extends AppCompatActivity {
}
private class ReCaptchaWebViewClient extends WebViewClient {
- private Activity context;
+ private final Activity context;
private String mCookies;
ReCaptchaWebViewClient(Activity ctx) {
diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java
index 4f1fdeab2..e22e2f474 100644
--- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java
@@ -1,7 +1,6 @@
package org.schabi.newpipe;
import android.annotation.SuppressLint;
-import android.app.FragmentManager;
import android.app.IntentService;
import android.content.Context;
import android.content.DialogInterface;
@@ -13,7 +12,6 @@ import android.preference.PreferenceManager;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
import android.support.v4.app.NotificationCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
@@ -38,7 +36,6 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
-import org.schabi.newpipe.fragments.detail.VideoDetailFragment;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.playqueue.ChannelPlayQueue;
import org.schabi.newpipe.player.playqueue.PlayQueue;
@@ -51,14 +48,12 @@ import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.ThemeHelper;
-import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
-import java.util.Observer;
import icepick.Icepick;
import icepick.State;
@@ -86,7 +81,7 @@ public class RouterActivity extends AppCompatActivity {
protected int selectedPreviously = -1;
protected String currentUrl;
- protected CompositeDisposable disposables = new CompositeDisposable();
+ protected final CompositeDisposable disposables = new CompositeDisposable();
private boolean selectionIsDownload = false;
@@ -184,12 +179,16 @@ public class RouterActivity extends AppCompatActivity {
if (selectedChoiceKey.equals(alwaysAskKey)) {
final List choices = getChoicesForService(currentService, currentLinkType);
- if (choices.size() == 1) {
- handleChoice(choices.get(0).key);
- } else if (choices.size() == 0) {
- handleChoice(showInfoKey);
- } else {
- showDialog(choices);
+ switch (choices.size()) {
+ case 1:
+ handleChoice(choices.get(0).key);
+ break;
+ case 0:
+ handleChoice(showInfoKey);
+ break;
+ default:
+ showDialog(choices);
+ break;
}
} else if (selectedChoiceKey.equals(showInfoKey)) {
handleChoice(showInfoKey);
diff --git a/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java b/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java
index 701e18cbf..09d33bd8a 100644
--- a/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java
+++ b/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java
@@ -4,7 +4,6 @@ import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.AsyncTask;
-import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AlertDialog;
import android.webkit.WebView;
@@ -17,7 +16,7 @@ import java.lang.ref.WeakReference;
public class LicenseFragmentHelper extends AsyncTask