Merge pull request #3884 from wb9688/use-androidx-annotation
Use androidx.annotation.NonNull instead of io.reactivex.annotations.NonNull
This commit is contained in:
commit
381c329441
5 changed files with 8 additions and 8 deletions
|
@ -9,6 +9,7 @@ import android.content.SharedPreferences;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
import com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache;
|
import com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache;
|
||||||
|
@ -37,7 +38,6 @@ import java.net.SocketException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.reactivex.annotations.NonNull;
|
|
||||||
import io.reactivex.exceptions.CompositeException;
|
import io.reactivex.exceptions.CompositeException;
|
||||||
import io.reactivex.exceptions.MissingBackpressureException;
|
import io.reactivex.exceptions.MissingBackpressureException;
|
||||||
import io.reactivex.exceptions.OnErrorNotImplementedException;
|
import io.reactivex.exceptions.OnErrorNotImplementedException;
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
|
||||||
|
|
||||||
if (description.getType() == Description.HTML) {
|
if (description.getType() == Description.HTML) {
|
||||||
disposables.add(Single.just(description.getContent())
|
disposables.add(Single.just(description.getContent())
|
||||||
.map((@io.reactivex.annotations.NonNull String descriptionText) -> {
|
.map((@NonNull String descriptionText) -> {
|
||||||
Spanned parsedDescription;
|
Spanned parsedDescription;
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24) {
|
||||||
parsedDescription = Html.fromHtml(descriptionText, 0);
|
parsedDescription = Html.fromHtml(descriptionText, 0);
|
||||||
|
@ -1037,7 +1037,7 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
|
||||||
})
|
})
|
||||||
.subscribeOn(Schedulers.computation())
|
.subscribeOn(Schedulers.computation())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe((@io.reactivex.annotations.NonNull Spanned spanned) -> {
|
.subscribe((@NonNull Spanned spanned) -> {
|
||||||
videoDescriptionView.setText(spanned);
|
videoDescriptionView.setText(spanned);
|
||||||
videoDescriptionView.setVisibility(View.VISIBLE);
|
videoDescriptionView.setVisibility(View.VISIBLE);
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -158,11 +158,10 @@ public abstract class BaseListInfoFragment<I extends ListInfo>
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.doFinally(this::allowDownwardFocusScroll)
|
.doFinally(this::allowDownwardFocusScroll)
|
||||||
.subscribe((@io.reactivex.annotations.NonNull
|
.subscribe((@NonNull ListExtractor.InfoItemsPage InfoItemsPage) -> {
|
||||||
ListExtractor.InfoItemsPage InfoItemsPage) -> {
|
|
||||||
isLoading.set(false);
|
isLoading.set(false);
|
||||||
handleNextItems(InfoItemsPage);
|
handleNextItems(InfoItemsPage);
|
||||||
}, (@io.reactivex.annotations.NonNull Throwable throwable) -> {
|
}, (@NonNull Throwable throwable) -> {
|
||||||
isLoading.set(false);
|
isLoading.set(false);
|
||||||
onError(throwable);
|
onError(throwable);
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,6 +2,8 @@ package org.schabi.newpipe.player.playqueue;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import org.schabi.newpipe.extractor.InfoItem;
|
import org.schabi.newpipe.extractor.InfoItem;
|
||||||
import org.schabi.newpipe.extractor.ListExtractor;
|
import org.schabi.newpipe.extractor.ListExtractor;
|
||||||
import org.schabi.newpipe.extractor.ListInfo;
|
import org.schabi.newpipe.extractor.ListInfo;
|
||||||
|
@ -13,7 +15,6 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.reactivex.SingleObserver;
|
import io.reactivex.SingleObserver;
|
||||||
import io.reactivex.annotations.NonNull;
|
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
abstract class AbstractInfoPlayQueue<T extends ListInfo, U extends InfoItem> extends PlayQueue {
|
abstract class AbstractInfoPlayQueue<T extends ListInfo, U extends InfoItem> extends PlayQueue {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import org.schabi.newpipe.R;
|
import org.schabi.newpipe.R;
|
||||||
|
@ -20,7 +21,6 @@ import org.schabi.newpipe.util.FallbackViewHolder;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.reactivex.Observer;
|
import io.reactivex.Observer;
|
||||||
import io.reactivex.annotations.NonNull;
|
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue