SponsorBlock: Merge branch 'dev' into sponsorblock
This commit is contained in:
commit
129d72d97a
140 changed files with 339 additions and 353 deletions
|
@ -84,7 +84,7 @@ ext {
|
|||
checkstyleVersion = '8.32'
|
||||
stethoVersion = '1.5.1'
|
||||
leakCanaryVersion = '2.2'
|
||||
exoPlayerVersion = '2.11.6'
|
||||
exoPlayerVersion = '2.11.8'
|
||||
androidxLifecycleVersion = '2.2.0'
|
||||
androidxRoomVersion = '2.2.5'
|
||||
groupieVersion = '2.8.0'
|
||||
|
@ -139,7 +139,7 @@ afterEvaluate {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
||||
implementation "frankiesardo:icepick:${icepickVersion}"
|
||||
kapt "frankiesardo:icepick-processor:${icepickVersion}"
|
||||
|
@ -169,7 +169,7 @@ dependencies {
|
|||
implementation "com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751"
|
||||
implementation "org.jsoup:jsoup:1.13.1"
|
||||
|
||||
implementation "com.squareup.okhttp3:okhttp:3.12.11"
|
||||
implementation "com.squareup.okhttp3:okhttp:3.12.12"
|
||||
|
||||
implementation "com.google.android.exoplayer:exoplayer:${exoPlayerVersion}"
|
||||
implementation "com.google.android.exoplayer:extension-mediasession:${exoPlayerVersion}"
|
||||
|
@ -187,7 +187,6 @@ dependencies {
|
|||
|
||||
implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}"
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:${androidxLifecycleVersion}"
|
||||
|
||||
implementation "androidx.room:room-runtime:${androidxRoomVersion}"
|
||||
implementation "androidx.room:room-rxjava2:${androidxRoomVersion}"
|
||||
|
|
|
@ -2,9 +2,9 @@ package org.schabi.newpipe.report;
|
|||
|
||||
import android.os.Parcel;
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.filters.LargeTest;
|
||||
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.schabi.newpipe.R;
|
||||
|
|
|
@ -300,8 +300,8 @@ public abstract class FragmentStatePagerAdapterMenuWorkaround extends PagerAdapt
|
|||
mSavedState.clear();
|
||||
mFragments.clear();
|
||||
if (fss != null) {
|
||||
for (int i = 0; i < fss.length; i++) {
|
||||
mSavedState.add((Fragment.SavedState) fss[i]);
|
||||
for (final Parcelable parcelable : fss) {
|
||||
mSavedState.add((Fragment.SavedState) parcelable);
|
||||
}
|
||||
}
|
||||
final Iterable<String> keys = bundle.keySet();
|
||||
|
|
|
@ -220,7 +220,7 @@ public class App extends Application {
|
|||
}
|
||||
|
||||
public void initNotificationChannel() {
|
||||
if (Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import android.content.pm.Signature;
|
|||
import android.net.ConnectivityManager;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.schabi.newpipe;
|
|||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -114,8 +114,8 @@ public final class DownloaderImpl extends Downloader {
|
|||
// Necessary because some servers (e.g. Framatube.org)
|
||||
// don't support the old cipher suites.
|
||||
// https://github.com/square/okhttp/issues/4053#issuecomment-402579554
|
||||
final List<CipherSuite> cipherSuites = new ArrayList<>();
|
||||
cipherSuites.addAll(ConnectionSpec.MODERN_TLS.cipherSuites());
|
||||
final List<CipherSuite> cipherSuites =
|
||||
new ArrayList<>(ConnectionSpec.MODERN_TLS.cipherSuites());
|
||||
cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA);
|
||||
cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA);
|
||||
final ConnectionSpec legacyTLS = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
|
||||
|
|
|
@ -42,7 +42,7 @@ public class ExitActivity extends Activity {
|
|||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
finishAndRemoveTask();
|
||||
} else {
|
||||
finish();
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.annotation.SuppressLint;
|
|||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import android.os.Build;
|
|||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import android.view.KeyEvent;
|
||||
|
|
|
@ -40,7 +40,7 @@ public class PanicResponderActivity extends Activity {
|
|||
ExitActivity.exitAndRemoveFromRecentApps(this);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
finishAndRemoveTask();
|
||||
} else {
|
||||
finish();
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -50,6 +50,7 @@ import org.schabi.newpipe.util.ExtractorHelper;
|
|||
import org.schabi.newpipe.util.ListHelper;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.PermissionHelper;
|
||||
import org.schabi.newpipe.util.ShareUtils;
|
||||
import org.schabi.newpipe.util.ThemeHelper;
|
||||
import org.schabi.newpipe.util.urlfinder.UrlFinder;
|
||||
import org.schabi.newpipe.views.FocusOverlayView;
|
||||
|
@ -159,27 +160,36 @@ public class RouterActivity extends AppCompatActivity {
|
|||
if (result) {
|
||||
onSuccess();
|
||||
} else {
|
||||
onError();
|
||||
showUnsupportedUrlDialog(url);
|
||||
}
|
||||
}, this::handleError));
|
||||
}, throwable -> handleError(throwable, url)));
|
||||
}
|
||||
|
||||
private void handleError(final Throwable error) {
|
||||
error.printStackTrace();
|
||||
private void handleError(final Throwable throwable, final String url) {
|
||||
throwable.printStackTrace();
|
||||
|
||||
if (error instanceof ExtractionException) {
|
||||
Toast.makeText(this, R.string.url_not_supported_toast, Toast.LENGTH_LONG).show();
|
||||
if (throwable instanceof ExtractionException) {
|
||||
showUnsupportedUrlDialog(url);
|
||||
} else {
|
||||
ExtractorHelper.handleGeneralException(this, -1, null, error,
|
||||
ExtractorHelper.handleGeneralException(this, -1, url, throwable,
|
||||
UserAction.SOMETHING_ELSE, null);
|
||||
finish();
|
||||
}
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
private void onError() {
|
||||
Toast.makeText(this, R.string.url_not_supported_toast, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
private void showUnsupportedUrlDialog(final String url) {
|
||||
final Context context = getThemeWrapperContext();
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(R.string.unsupported_url)
|
||||
.setMessage(R.string.unsupported_url_dialog_message)
|
||||
.setIcon(ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_share))
|
||||
.setPositiveButton(R.string.open_in_browser,
|
||||
(dialog, which) -> ShareUtils.openUrlInBrowser(this, url))
|
||||
.setNegativeButton(R.string.share,
|
||||
(dialog, which) -> ShareUtils.shareUrl(this, "", url)) // no subject
|
||||
.setNeutralButton(R.string.cancel, null)
|
||||
.setOnDismissListener(dialog -> finish())
|
||||
.show();
|
||||
}
|
||||
|
||||
protected void onSuccess() {
|
||||
|
@ -459,7 +469,7 @@ public class RouterActivity extends AppCompatActivity {
|
|||
startActivity(intent);
|
||||
|
||||
finish();
|
||||
}, this::handleError)
|
||||
}, throwable -> handleError(throwable, currentUrl))
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -492,11 +502,9 @@ public class RouterActivity extends AppCompatActivity {
|
|||
downloadDialog.setSelectedVideoStream(selectedVideoStreamIndex);
|
||||
downloadDialog.show(fm, "downloadDialog");
|
||||
fm.executePendingTransactions();
|
||||
downloadDialog.getDialog().setOnDismissListener(dialog -> {
|
||||
finish();
|
||||
});
|
||||
downloadDialog.getDialog().setOnDismissListener(dialog -> finish());
|
||||
}, (@NonNull Throwable throwable) -> {
|
||||
onError();
|
||||
showUnsupportedUrlDialog(currentUrl);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -572,7 +580,7 @@ public class RouterActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
}
|
||||
return result.toArray(new String[result.size()]);
|
||||
return result.toArray(new String[0]);
|
||||
}
|
||||
|
||||
private static class AdapterChoiceItem {
|
||||
|
|
|
@ -167,7 +167,7 @@ public class AboutActivity extends AppCompatActivity {
|
|||
*/
|
||||
public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
||||
public SectionsPagerAdapter(final FragmentManager fm) {
|
||||
super(fm);
|
||||
super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,13 +14,13 @@ import io.reactivex.Flowable;
|
|||
@Dao
|
||||
public interface BasicDAO<Entity> {
|
||||
/* Inserts */
|
||||
@Insert(onConflict = OnConflictStrategy.FAIL)
|
||||
@Insert(onConflict = OnConflictStrategy.ABORT)
|
||||
long insert(Entity entity);
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.FAIL)
|
||||
@Insert(onConflict = OnConflictStrategy.ABORT)
|
||||
List<Long> insertAll(Entity... entities);
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.FAIL)
|
||||
@Insert(onConflict = OnConflictStrategy.ABORT)
|
||||
List<Long> insertAll(Collection<Entity> entities);
|
||||
|
||||
/* Searches */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.schabi.newpipe.download;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
|
@ -11,6 +10,7 @@ import android.view.ViewTreeObserver;
|
|||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.util.DeviceUtils;
|
||||
|
|
|
@ -10,7 +10,7 @@ import android.net.Uri;
|
|||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -295,7 +295,7 @@ public class DownloadDialog extends DialogFragment
|
|||
initToolbar(view.findViewById(R.id.toolbar));
|
||||
setupDownloadOptions();
|
||||
|
||||
prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
prefs = PreferenceManager.getDefaultSharedPreferences(requireContext());
|
||||
|
||||
final int threads = prefs.getInt(getString(R.string.default_download_threads), 3);
|
||||
threadsCountTextView.setText(String.valueOf(threads));
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.schabi.newpipe.fragments;
|
|||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -74,7 +74,7 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
|
|||
|
||||
youtubeRestrictedModeEnabledKey = getString(R.string.youtube_restricted_mode_enabled);
|
||||
previousYoutubeRestrictedModeEnabled =
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext())
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||
.getBoolean(youtubeRestrictedModeEnabledKey, false);
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
|
|||
super.onResume();
|
||||
|
||||
final boolean youtubeRestrictedModeEnabled =
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext())
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||
.getBoolean(youtubeRestrictedModeEnabledKey, false);
|
||||
if (previousYoutubeRestrictedModeEnabled != youtubeRestrictedModeEnabled) {
|
||||
previousYoutubeRestrictedModeEnabled = youtubeRestrictedModeEnabled;
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.schabi.newpipe.fragments.detail;
|
|||
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
@ -10,16 +11,20 @@ import androidx.fragment.app.FragmentPagerAdapter;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TabAdaptor extends FragmentPagerAdapter {
|
||||
public class TabAdapter extends FragmentPagerAdapter {
|
||||
private final List<Fragment> mFragmentList = new ArrayList<>();
|
||||
private final List<String> mFragmentTitleList = new ArrayList<>();
|
||||
private final FragmentManager fragmentManager;
|
||||
|
||||
public TabAdaptor(final FragmentManager fm) {
|
||||
super(fm);
|
||||
public TabAdapter(final FragmentManager fm) {
|
||||
// if changed to BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT => crash if enqueueing stream in
|
||||
// the background and then clicking on it to open VideoDetailFragment:
|
||||
// "Cannot setMaxLifecycle for Fragment not attached to FragmentManager"
|
||||
super(fm, BEHAVIOR_SET_USER_VISIBLE_HINT);
|
||||
this.fragmentManager = fm;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(final int position) {
|
||||
return mFragmentList.get(position);
|
||||
|
@ -57,7 +62,7 @@ public class TabAdaptor extends FragmentPagerAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getItemPosition(final Object object) {
|
||||
public int getItemPosition(@NonNull final Object object) {
|
||||
if (mFragmentList.contains(object)) {
|
||||
return mFragmentList.indexOf(object);
|
||||
} else {
|
||||
|
@ -82,7 +87,9 @@ public class TabAdaptor extends FragmentPagerAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void destroyItem(final ViewGroup container, final int position, final Object object) {
|
||||
public void destroyItem(@NonNull final ViewGroup container,
|
||||
final int position,
|
||||
@NonNull final Object object) {
|
||||
fragmentManager.beginTransaction().remove((Fragment) object).commitNowAllowingStateLoss();
|
||||
}
|
||||
|
|
@ -16,9 +16,9 @@ import android.os.Build;
|
|||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.provider.Settings;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.util.Linkify;
|
||||
|
@ -244,7 +244,7 @@ public class VideoDetailFragment
|
|||
|
||||
private AppBarLayout appBarLayout;
|
||||
private ViewPager viewPager;
|
||||
private TabAdaptor pageAdapter;
|
||||
private TabAdapter pageAdapter;
|
||||
private TabLayout tabLayout;
|
||||
private FrameLayout relatedStreamsLayout;
|
||||
|
||||
|
@ -427,7 +427,7 @@ public class VideoDetailFragment
|
|||
currentWorker.dispose();
|
||||
}
|
||||
saveCurrentAndRestoreDefaultBrightness();
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext())
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||
.edit()
|
||||
.putString(getString(R.string.stream_info_selected_tab_key),
|
||||
pageAdapter.getItemTitle(viewPager.getCurrentItem()))
|
||||
|
@ -553,7 +553,6 @@ public class VideoDetailFragment
|
|||
|
||||
Serializable serializable = savedState.getSerializable(INFO_KEY);
|
||||
if (serializable instanceof StreamInfo) {
|
||||
//noinspection unchecked
|
||||
currentInfo = (StreamInfo) serializable;
|
||||
InfoCache.getInstance().putInfo(serviceId, url, currentInfo, InfoItem.InfoType.STREAM);
|
||||
}
|
||||
|
@ -673,7 +672,8 @@ public class VideoDetailFragment
|
|||
}
|
||||
break;
|
||||
case R.id.detail_title_root_layout:
|
||||
ShareUtils.copyToClipboard(getContext(), videoTitleTextView.getText().toString());
|
||||
ShareUtils.copyToClipboard(requireContext(),
|
||||
videoTitleTextView.getText().toString());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -752,7 +752,7 @@ public class VideoDetailFragment
|
|||
|
||||
appBarLayout = rootView.findViewById(R.id.appbarlayout);
|
||||
viewPager = rootView.findViewById(R.id.viewpager);
|
||||
pageAdapter = new TabAdaptor(getChildFragmentManager());
|
||||
pageAdapter = new TabAdapter(getChildFragmentManager());
|
||||
viewPager.setAdapter(pageAdapter);
|
||||
tabLayout = rootView.findViewById(R.id.tablayout);
|
||||
tabLayout.setupWithViewPager(viewPager);
|
||||
|
@ -1106,7 +1106,7 @@ public class VideoDetailFragment
|
|||
player.toggleFullscreen();
|
||||
}
|
||||
|
||||
if (!useExternalAudioPlayer && android.os.Build.VERSION.SDK_INT >= 16) {
|
||||
if (!useExternalAudioPlayer) {
|
||||
openNormalBackgroundPlayer(append);
|
||||
} else {
|
||||
startOnExternalPlayer(activity, currentInfo, audioStream);
|
||||
|
@ -1303,24 +1303,17 @@ public class VideoDetailFragment
|
|||
|
||||
if (description.getType() == Description.HTML) {
|
||||
disposables.add(Single.just(description.getContent())
|
||||
.map((@NonNull String descriptionText) -> {
|
||||
final Spanned parsedDescription;
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
parsedDescription = Html.fromHtml(descriptionText, 0);
|
||||
} else {
|
||||
//noinspection deprecation
|
||||
parsedDescription = Html.fromHtml(descriptionText);
|
||||
}
|
||||
return parsedDescription;
|
||||
})
|
||||
.map((@NonNull final String descriptionText) ->
|
||||
HtmlCompat.fromHtml(descriptionText,
|
||||
HtmlCompat.FROM_HTML_MODE_LEGACY))
|
||||
.subscribeOn(Schedulers.computation())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe((@NonNull Spanned spanned) -> {
|
||||
.subscribe((@NonNull final Spanned spanned) -> {
|
||||
videoDescriptionView.setText(spanned);
|
||||
videoDescriptionView.setVisibility(View.VISIBLE);
|
||||
}));
|
||||
} else if (description.getType() == Description.MARKDOWN) {
|
||||
final Markwon markwon = Markwon.builder(getContext())
|
||||
final Markwon markwon = Markwon.builder(requireContext())
|
||||
.usePlugin(LinkifyPlugin.create())
|
||||
.build();
|
||||
markwon.setMarkdown(videoDescriptionView, description.getContent());
|
||||
|
@ -1984,6 +1977,11 @@ public class VideoDetailFragment
|
|||
return;
|
||||
}
|
||||
|
||||
// Prevent jumping of the player on devices with cutout
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
activity.getWindow().getAttributes().layoutInDisplayCutoutMode =
|
||||
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT;
|
||||
}
|
||||
activity.getWindow().getDecorView().setSystemUiVisibility(0);
|
||||
activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -1997,6 +1995,11 @@ public class VideoDetailFragment
|
|||
return;
|
||||
}
|
||||
|
||||
// Prevent jumping of the player on devices with cutout
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
activity.getWindow().getAttributes().layoutInDisplayCutoutMode =
|
||||
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER;
|
||||
}
|
||||
final int visibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
|
|
|
@ -6,7 +6,7 @@ import android.content.SharedPreferences;
|
|||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
|
@ -133,7 +133,7 @@ public abstract class BaseListInfoFragment<I extends ListInfo>
|
|||
currentInfo = result;
|
||||
currentNextPage = result.getNextPage();
|
||||
handleResult(result);
|
||||
}, (@NonNull Throwable throwable) -> onError(throwable));
|
||||
}, this::onError);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,8 +26,6 @@ import io.reactivex.disposables.CompositeDisposable;
|
|||
public class CommentsFragment extends BaseListInfoFragment<CommentsInfo> {
|
||||
private CompositeDisposable disposables = new CompositeDisposable();
|
||||
|
||||
private boolean mIsVisibleToUser = false;
|
||||
|
||||
public static CommentsFragment getInstance(final int serviceId, final String url,
|
||||
final String name) {
|
||||
final CommentsFragment instance = new CommentsFragment();
|
||||
|
@ -39,12 +37,6 @@ public class CommentsFragment extends BaseListInfoFragment<CommentsInfo> {
|
|||
// LifeCycle
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
@Override
|
||||
public void setUserVisibleHint(final boolean isVisibleToUser) {
|
||||
super.setUserVisibleHint(isVisibleToUser);
|
||||
mIsVisibleToUser = isVisibleToUser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(final Context context) {
|
||||
super.onAttach(context);
|
||||
|
@ -92,7 +84,7 @@ public class CommentsFragment extends BaseListInfoFragment<CommentsInfo> {
|
|||
public void handleResult(@NonNull final CommentsInfo result) {
|
||||
super.handleResult(result);
|
||||
|
||||
AnimationUtils.slideUp(getView(), 120, 150, 0.06f);
|
||||
AnimationUtils.slideUp(requireView(), 120, 150, 0.06f);
|
||||
|
||||
if (!result.getErrors().isEmpty()) {
|
||||
showSnackBarError(result.getErrors(), UserAction.REQUESTED_COMMENTS,
|
||||
|
|
|
@ -5,7 +5,8 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.text.Editable;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
|
@ -73,7 +74,6 @@ import io.reactivex.disposables.Disposable;
|
|||
import io.reactivex.schedulers.Schedulers;
|
||||
import io.reactivex.subjects.PublishSubject;
|
||||
|
||||
import static android.text.Html.escapeHtml;
|
||||
import static androidx.recyclerview.widget.ItemTouchHelper.Callback.makeMovementFlags;
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
@ -812,7 +812,7 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
|||
getFM().popBackStackImmediate();
|
||||
activity.startActivity(intent);
|
||||
}, throwable ->
|
||||
showError(getString(R.string.url_not_supported_toast), false)));
|
||||
showError(getString(R.string.unsupported_url), false)));
|
||||
return;
|
||||
}
|
||||
} catch (final Exception ignored) {
|
||||
|
@ -1005,10 +1005,9 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
|||
: R.string.did_you_mean);
|
||||
|
||||
final String highlightedSearchSuggestion =
|
||||
"<b><i>" + escapeHtml(searchSuggestion) + "</i></b>";
|
||||
correctSuggestion.setText(
|
||||
Html.fromHtml(String.format(helperText, highlightedSearchSuggestion)));
|
||||
|
||||
"<b><i>" + Html.escapeHtml(searchSuggestion) + "</i></b>";
|
||||
final String text = String.format(helperText, highlightedSearchSuggestion);
|
||||
correctSuggestion.setText(HtmlCompat.fromHtml(text, HtmlCompat.FROM_HTML_MODE_LEGACY));
|
||||
|
||||
correctSuggestion.setOnClickListener(v -> {
|
||||
correctSuggestion.setVisibility(View.GONE);
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.schabi.newpipe.fragments.list.videos;
|
|||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
@ -78,11 +78,11 @@ public class RelatedVideosFragment extends BaseListInfoFragment<RelatedStreamInf
|
|||
autoplaySwitch = headerRootLayout.findViewById(R.id.autoplay_switch);
|
||||
|
||||
final SharedPreferences pref = PreferenceManager
|
||||
.getDefaultSharedPreferences(getContext());
|
||||
.getDefaultSharedPreferences(requireContext());
|
||||
final boolean autoplay = pref.getBoolean(getString(R.string.auto_queue_key), false);
|
||||
autoplaySwitch.setChecked(autoplay);
|
||||
autoplaySwitch.setOnCheckedChangeListener((compoundButton, b) ->
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext()).edit()
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext()).edit()
|
||||
.putBoolean(getString(R.string.auto_queue_key), b).apply());
|
||||
return headerRootLayout;
|
||||
} else {
|
||||
|
@ -166,12 +166,10 @@ public class RelatedVideosFragment extends BaseListInfoFragment<RelatedStreamInf
|
|||
|
||||
@Override
|
||||
public void setTitle(final String title) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
|
||||
return;
|
||||
}
|
||||
|
||||
private void setInitialData(final StreamInfo info) {
|
||||
|
@ -201,7 +199,8 @@ public class RelatedVideosFragment extends BaseListInfoFragment<RelatedStreamInf
|
|||
@Override
|
||||
public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences,
|
||||
final String s) {
|
||||
final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
final SharedPreferences pref =
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext());
|
||||
final boolean autoplay = pref.getBoolean(getString(R.string.auto_queue_key), false);
|
||||
if (autoplaySwitch != null) {
|
||||
autoplaySwitch.setChecked(autoplay);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.schabi.newpipe.info_list.holder;
|
||||
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.content.SharedPreferences;
|
|||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
|
@ -271,9 +271,8 @@ public final class BookmarkFragment extends BaseLocalListFragment<List<PlaylistL
|
|||
|
||||
final Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setView(dialogView)
|
||||
.setPositiveButton(R.string.rename_playlist, (dialog, which) -> {
|
||||
changeLocalPlaylistName(selectedItem.uid, editText.getText().toString());
|
||||
})
|
||||
.setPositiveButton(R.string.rename_playlist, (dialog, which) ->
|
||||
changeLocalPlaylistName(selectedItem.uid, editText.getText().toString()))
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setNeutralButton(R.string.delete, (dialog, which) -> {
|
||||
showDeleteDialog(selectedItem.name,
|
||||
|
|
|
@ -30,7 +30,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.preference.PreferenceManager
|
||||
import icepick.State
|
||||
import java.util.Calendar
|
||||
|
@ -82,7 +82,7 @@ class FeedFragment : BaseListFragment<FeedState, Unit>() {
|
|||
override fun onViewCreated(rootView: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(rootView, savedInstanceState)
|
||||
|
||||
viewModel = ViewModelProviders.of(this, FeedViewModel.Factory(requireContext(), groupId)).get(FeedViewModel::class.java)
|
||||
viewModel = ViewModelProvider(this, FeedViewModel.Factory(requireContext(), groupId)).get(FeedViewModel::class.java)
|
||||
viewModel.stateLiveData.observe(viewLifecycleOwner, Observer { it?.let(::handleResult) })
|
||||
}
|
||||
|
||||
|
|
|
@ -27,10 +27,10 @@ import android.content.Intent
|
|||
import android.content.IntentFilter
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import android.preference.PreferenceManager
|
||||
import android.util.Log
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.preference.PreferenceManager
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.Notification
|
||||
import io.reactivex.Single
|
||||
|
|
|
@ -20,7 +20,7 @@ package org.schabi.newpipe.local.history;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
|
|
|
@ -553,9 +553,8 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||
.setView(dialogView)
|
||||
.setCancelable(true)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setPositiveButton(R.string.rename, (dialogInterface, i) -> {
|
||||
changePlaylistName(nameEdit.getText().toString());
|
||||
});
|
||||
.setPositiveButton(R.string.rename, (dialogInterface, i) ->
|
||||
changePlaylistName(nameEdit.getText().toString()));
|
||||
|
||||
dialogBuilder.show();
|
||||
}
|
||||
|
|
|
@ -11,15 +11,15 @@ import android.content.res.Configuration
|
|||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.os.Parcelable
|
||||
import android.preference.PreferenceManager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import androidx.preference.PreferenceManager
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.nononsenseapps.filepicker.Utils
|
||||
import com.xwray.groupie.Group
|
||||
|
@ -277,7 +277,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
|
|||
}
|
||||
items_list.adapter = groupAdapter
|
||||
|
||||
viewModel = ViewModelProviders.of(this).get(SubscriptionViewModel::class.java)
|
||||
viewModel = ViewModelProvider(this).get(SubscriptionViewModel::class.java)
|
||||
viewModel.stateLiveData.observe(viewLifecycleOwner, androidx.lifecycle.Observer { it?.let(this::handleResult) })
|
||||
viewModel.feedGroupsLiveData.observe(viewLifecycleOwner, androidx.lifecycle.Observer { it?.let(this::handleFeedGroups) })
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ class FeedGroupDialog : DialogFragment(), BackPressable {
|
|||
}
|
||||
})
|
||||
|
||||
subscriptionGroupAdapter?.setOnItemClickListener(subscriptionPickerItemListener)
|
||||
subscriptionGroupAdapter.setOnItemClickListener(subscriptionPickerItemListener)
|
||||
}
|
||||
|
||||
private fun handlePositiveButton() = when {
|
||||
|
|
|
@ -6,7 +6,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.ItemTouchHelper.SimpleCallback
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
|
@ -49,7 +49,7 @@ class FeedGroupReorderDialog : DialogFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
viewModel = ViewModelProviders.of(this).get(FeedGroupReorderDialogViewModel::class.java)
|
||||
viewModel = ViewModelProvider(this).get(FeedGroupReorderDialogViewModel::class.java)
|
||||
viewModel.groupsLiveData.observe(viewLifecycleOwner, Observer(::handleGroups))
|
||||
viewModel.dialogEventLiveData.observe(viewLifecycleOwner, Observer {
|
||||
when (it) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import android.content.SharedPreferences;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.media.AudioManager;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
|
|
@ -30,7 +30,7 @@ import android.graphics.Bitmap;
|
|||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
|
@ -310,9 +310,7 @@ public final class MainPlayer extends Service {
|
|||
setLockScreenThumbnail(builder);
|
||||
}
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
|
||||
builder.setPriority(NotificationCompat.PRIORITY_MAX);
|
||||
}
|
||||
builder.setPriority(NotificationCompat.PRIORITY_MAX);
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,10 @@ import android.content.SharedPreferences;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import android.view.Menu;
|
||||
|
@ -213,18 +214,18 @@ public abstract class VideoPlayer extends BasePlayer
|
|||
|
||||
this.captionTextView = view.findViewById(R.id.captionTextView);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
this.playbackSeekBar.getProgressDrawable().
|
||||
setColorFilter(Color.RED, PorterDuff.Mode.MULTIPLY);
|
||||
playbackSeekBar.getThumb()
|
||||
.setColorFilter(new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.SRC_IN));
|
||||
this.playbackSeekBar.getProgressDrawable()
|
||||
.setColorFilter(new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.MULTIPLY));
|
||||
|
||||
this.qualityPopupMenu = new PopupMenu(context, qualityTextView);
|
||||
this.playbackSpeedPopupMenu = new PopupMenu(context, playbackSpeedTextView);
|
||||
this.captionPopupMenu = new PopupMenu(context, captionTextView);
|
||||
|
||||
((ProgressBar) this.loadingPanel.findViewById(R.id.progressBarLoadingPanel))
|
||||
.getIndeterminateDrawable().setColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY);
|
||||
.getIndeterminateDrawable()
|
||||
.setColorFilter(new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY));
|
||||
}
|
||||
|
||||
protected abstract void setupSubtitleView(@NonNull SubtitleView view, float captionScale,
|
||||
|
@ -252,7 +253,7 @@ public abstract class VideoPlayer extends BasePlayer
|
|||
simpleExoPlayer.addTextOutput(cues -> subtitleView.onCues(cues));
|
||||
|
||||
// Setup audio session with onboard equalizer
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
trackSelector.setParameters(trackSelector.buildUponParameters()
|
||||
.setTunnelingAudioSessionId(C.generateAudioSessionIdV21(context)));
|
||||
}
|
||||
|
@ -459,11 +460,8 @@ public abstract class VideoPlayer extends BasePlayer
|
|||
animateView(controlsRoot, false, DEFAULT_CONTROLS_DURATION);
|
||||
|
||||
playbackSeekBar.setEnabled(false);
|
||||
// Bug on lower api, disabling and enabling the seekBar resets the thumb color -.-,
|
||||
// so sets the color again
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
playbackSeekBar.getThumb()
|
||||
.setColorFilter(new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.SRC_IN));
|
||||
|
||||
loadingPanel.setBackgroundColor(Color.BLACK);
|
||||
animateView(loadingPanel, true, 0);
|
||||
|
@ -479,11 +477,8 @@ public abstract class VideoPlayer extends BasePlayer
|
|||
showAndAnimateControl(-1, true);
|
||||
|
||||
playbackSeekBar.setEnabled(true);
|
||||
// Bug on lower api, disabling and enabling the seekBar resets the thumb color -.-,
|
||||
// so sets the color again
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
playbackSeekBar.getThumb()
|
||||
.setColorFilter(new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.SRC_IN));
|
||||
|
||||
loadingPanel.setVisibility(View.GONE);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import android.graphics.Point;
|
|||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.provider.Settings;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
|
@ -1002,8 +1002,8 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
// show kodi button if it supports the current service and it is enabled in settings
|
||||
final boolean showKodiButton = playQueue != null && playQueue.getItem() != null
|
||||
&& KoreUtil.isServiceSupportedByKore(playQueue.getItem().getServiceId())
|
||||
&& PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getBoolean(context.getString(R.string.show_play_with_kodi_key), false);
|
||||
&& PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getBoolean(context.getString(R.string.show_play_with_kodi_key), false);
|
||||
playWithKodi.setVisibility(videoPlayerSelected() && kodiEnabled && showKodiButton
|
||||
? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
@ -1586,9 +1586,10 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
// It doesn't include NavigationBar, notches, etc.
|
||||
display.getSize(size);
|
||||
|
||||
final boolean isLandscape = service.isLandscape();
|
||||
final int width = isFullscreen
|
||||
? (service.isLandscape()
|
||||
? size.x : size.y) : ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
? (isLandscape ? size.x : size.y)
|
||||
: ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
final int gravity = isFullscreen
|
||||
? (display.getRotation() == Surface.ROTATION_90
|
||||
? Gravity.START : Gravity.END)
|
||||
|
@ -1619,14 +1620,16 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
// And the situations when we need to set custom height is
|
||||
// in fullscreen mode in tablet in non-multiWindow mode or with vertical video.
|
||||
// Other than that MATCH_PARENT is good
|
||||
final boolean navBarAtTheBottom = DeviceUtils.isTablet(service) || !service.isLandscape();
|
||||
final boolean navBarAtTheBottom = DeviceUtils.isTablet(service) || !isLandscape;
|
||||
controlsRoot.getLayoutParams().height = isFullscreen && !isInMultiWindow()
|
||||
&& navBarAtTheBottom ? size.y : ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
controlsRoot.requestLayout();
|
||||
|
||||
final int topPadding = isFullscreen && !isInMultiWindow() ? getStatusBarHeight() : 0;
|
||||
getRootView().findViewById(R.id.playbackWindowRoot).setPadding(0, topPadding, 0, 0);
|
||||
getRootView().findViewById(R.id.playbackWindowRoot).requestLayout();
|
||||
final DisplayMetrics metrics = getRootView().getResources().getDisplayMetrics();
|
||||
int topPadding = isFullscreen && !isInMultiWindow() ? getStatusBarHeight() : 0;
|
||||
topPadding = !isLandscape && DeviceUtils.hasCutout(topPadding, metrics) ? 0 : topPadding;
|
||||
getRootView().findViewById(R.id.playbackWindowRoot).setTranslationY(topPadding);
|
||||
getBottomControlsRoot().setTranslationY(-topPadding);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1635,8 +1638,12 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
*/
|
||||
private int getStatusBarHeight() {
|
||||
int statusBarHeight = 0;
|
||||
final int resourceId = service.getResources().getIdentifier(
|
||||
"status_bar_height_landscape", "dimen", "android");
|
||||
final int resourceId = service.isLandscape()
|
||||
? service.getResources().getIdentifier(
|
||||
"status_bar_height_landscape", "dimen", "android")
|
||||
: service.getResources().getIdentifier(
|
||||
"status_bar_height", "dimen", "android");
|
||||
|
||||
if (resourceId > 0) {
|
||||
statusBarHeight = service.getResources().getDimensionPixelSize(resourceId);
|
||||
}
|
||||
|
@ -2037,7 +2044,7 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
}
|
||||
|
||||
private int popupLayoutParamType() {
|
||||
return Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O
|
||||
return Build.VERSION.SDK_INT < Build.VERSION_CODES.O
|
||||
? WindowManager.LayoutParams.TYPE_PHONE
|
||||
: WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||
}
|
||||
|
@ -2193,7 +2200,7 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
* This will be called when a user goes to another app/activity, turns off a screen.
|
||||
* We don't want to interrupt playback and don't want to see notification so
|
||||
* next lines of code will enable audio-only playback only if needed
|
||||
* */
|
||||
*/
|
||||
private void onFragmentStopped() {
|
||||
if (videoPlayerSelected() && (isPlaying() || isLoading())) {
|
||||
if (backgroundPlaybackEnabled()) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.schabi.newpipe.player.helper;
|
|||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
|
@ -239,12 +239,13 @@ public class PlaybackParameterDialog extends DialogFragment {
|
|||
unhookingCheckbox = rootView.findViewById(R.id.unhookCheckbox);
|
||||
if (unhookingCheckbox != null) {
|
||||
// restore whether pitch and tempo are unhooked or not
|
||||
unhookingCheckbox.setChecked(PreferenceManager.getDefaultSharedPreferences(getContext())
|
||||
unhookingCheckbox.setChecked(PreferenceManager
|
||||
.getDefaultSharedPreferences(requireContext())
|
||||
.getBoolean(getString(R.string.playback_unhook_key), true));
|
||||
|
||||
unhookingCheckbox.setOnCheckedChangeListener((compoundButton, isChecked) -> {
|
||||
// save whether pitch and tempo are unhooked or not
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext())
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||
.edit()
|
||||
.putBoolean(getString(R.string.playback_unhook_key), isChecked)
|
||||
.apply();
|
||||
|
|
|
@ -2,8 +2,7 @@ package org.schabi.newpipe.player.helper;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.provider.Settings;
|
||||
import android.view.accessibility.CaptioningManager;
|
||||
|
||||
|
@ -303,10 +302,6 @@ public final class PlayerHelper {
|
|||
|
||||
@NonNull
|
||||
public static CaptionStyleCompat getCaptionStyle(@NonNull final Context context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
||||
return CaptionStyleCompat.DEFAULT;
|
||||
}
|
||||
|
||||
final CaptioningManager captioningManager = (CaptioningManager)
|
||||
context.getSystemService(Context.CAPTIONING_SERVICE);
|
||||
if (captioningManager == null || !captioningManager.isEnabled()) {
|
||||
|
@ -331,10 +326,6 @@ public final class PlayerHelper {
|
|||
* @return caption scaling
|
||||
*/
|
||||
public static float getCaptionScale(@NonNull final Context context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
||||
return 1f;
|
||||
}
|
||||
|
||||
final CaptioningManager captioningManager
|
||||
= (CaptioningManager) context.getSystemService(Context.CAPTIONING_SERVICE);
|
||||
if (captioningManager == null || !captioningManager.isEnabled()) {
|
||||
|
|
|
@ -115,7 +115,7 @@ public class VideoPlaybackResolver implements PlaybackResolver {
|
|||
return mediaSources.get(0);
|
||||
} else {
|
||||
return new MergingMediaSource(mediaSources.toArray(
|
||||
new MediaSource[mediaSources.size()]));
|
||||
new MediaSource[0]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,18 +216,16 @@ public class ErrorActivity extends AppCompatActivity {
|
|||
addGuruMeditation();
|
||||
currentTimeStamp = getCurrentTimeStamp();
|
||||
|
||||
reportEmailButton.setOnClickListener((View v) -> {
|
||||
openPrivacyPolicyDialog(this, "EMAIL");
|
||||
});
|
||||
reportEmailButton.setOnClickListener((View v) ->
|
||||
openPrivacyPolicyDialog(this, "EMAIL"));
|
||||
|
||||
copyButton.setOnClickListener((View v) -> {
|
||||
ShareUtils.copyToClipboard(this, buildMarkdown());
|
||||
Toast.makeText(this, R.string.msg_copied, Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
|
||||
reportGithubButton.setOnClickListener((View v) -> {
|
||||
openPrivacyPolicyDialog(this, "GITHUB");
|
||||
});
|
||||
reportGithubButton.setOnClickListener((View v) ->
|
||||
openPrivacyPolicyDialog(this, "GITHUB"));
|
||||
|
||||
|
||||
// normal bugreport
|
||||
|
@ -278,10 +276,9 @@ public class ErrorActivity extends AppCompatActivity {
|
|||
.setTitle(R.string.privacy_policy_title)
|
||||
.setMessage(R.string.start_accept_privacy_policy)
|
||||
.setCancelable(false)
|
||||
.setNeutralButton(R.string.read_privacy_policy, (dialog, which) -> {
|
||||
ShareUtils.openUrlInBrowser(context,
|
||||
context.getString(R.string.privacy_policy_url));
|
||||
})
|
||||
.setNeutralButton(R.string.read_privacy_policy, (dialog, which) ->
|
||||
ShareUtils.openUrlInBrowser(context,
|
||||
context.getString(R.string.privacy_policy_url)))
|
||||
.setPositiveButton(R.string.accept, (dialog, which) -> {
|
||||
if (action.equals("EMAIL")) { // send on email
|
||||
final Intent i = new Intent(Intent.ACTION_SENDTO)
|
||||
|
@ -469,7 +466,8 @@ public class ErrorActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
private String getOsString() {
|
||||
final String osBase = Build.VERSION.SDK_INT >= 23 ? Build.VERSION.BASE_OS : "Android";
|
||||
final String osBase = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
|
||||
? Build.VERSION.BASE_OS : "Android";
|
||||
return System.getProperty("os.name")
|
||||
+ " " + (osBase.isEmpty() ? "Android" : osBase)
|
||||
+ " " + Build.VERSION.RELEASE
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.schabi.newpipe.settings;
|
|||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -20,7 +20,7 @@ public abstract class BasePreferenceFragment extends PreferenceFragmentCompat {
|
|||
|
||||
@Override
|
||||
public void onCreate(@Nullable final Bundle savedInstanceState) {
|
||||
defaultPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
defaultPreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
@ -77,7 +77,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||
initialSelectedContentCountry = org.schabi.newpipe.util.Localization
|
||||
.getPreferredContentCountry(requireContext());
|
||||
initialLanguage = PreferenceManager
|
||||
.getDefaultSharedPreferences(getContext()).getString("app_language_key", "en");
|
||||
.getDefaultSharedPreferences(requireContext()).getString("app_language_key", "en");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -208,7 +208,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||
final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization
|
||||
.getPreferredContentCountry(requireContext());
|
||||
final String selectedLanguage = PreferenceManager
|
||||
.getDefaultSharedPreferences(getContext()).getString("app_language_key", "en");
|
||||
.getDefaultSharedPreferences(requireContext()).getString("app_language_key", "en");
|
||||
|
||||
if (!selectedLocalization.equals(initialSelectedLocalization)
|
||||
|| !selectedContentCountry.equals(initialSelectedContentCountry)
|
||||
|
@ -277,7 +277,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||
try {
|
||||
output = new ObjectOutputStream(new FileOutputStream(dst));
|
||||
final SharedPreferences pref
|
||||
= PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
= PreferenceManager.getDefaultSharedPreferences(requireContext());
|
||||
output.writeObject(pref.getAll());
|
||||
|
||||
} catch (final IOException e) {
|
||||
|
@ -359,7 +359,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||
try {
|
||||
input = new ObjectInputStream(new FileInputStream(src));
|
||||
final SharedPreferences.Editor prefEdit = PreferenceManager
|
||||
.getDefaultSharedPreferences(getContext()).edit();
|
||||
.getDefaultSharedPreferences(requireContext()).edit();
|
||||
prefEdit.clear();
|
||||
final Map<String, ?> entries = (Map<String, ?>) input.readObject();
|
||||
for (final Map.Entry<String, ?> entry : entries.entrySet()) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.annotation.SuppressLint;
|
|||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.text.InputType;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -213,9 +213,8 @@ public class PeertubeInstanceListFragment extends Fragment {
|
|||
|
||||
private void initButton(final View rootView) {
|
||||
final FloatingActionButton fab = rootView.findViewById(R.id.addInstanceButton);
|
||||
fab.setOnClickListener(v -> {
|
||||
showAddItemDialog(requireContext());
|
||||
});
|
||||
fab.setOnClickListener(v ->
|
||||
showAddItemDialog(requireContext()));
|
||||
}
|
||||
|
||||
private void showAddItemDialog(final Context c) {
|
||||
|
|
|
@ -208,12 +208,7 @@ public class SelectChannelFragment extends DialogFragment {
|
|||
public void onBindViewHolder(final SelectChannelItemHolder holder, final int position) {
|
||||
final SubscriptionEntity entry = subscriptions.get(position);
|
||||
holder.titleView.setText(entry.getName());
|
||||
holder.view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View view) {
|
||||
clickedItem(position);
|
||||
}
|
||||
});
|
||||
holder.view.setOnClickListener(view -> clickedItem(position));
|
||||
imageLoader.displayImage(entry.getAvatarUrl(), holder.thumbnailView,
|
||||
DISPLAY_IMAGE_OPTIONS);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
|
|||
}
|
||||
}
|
||||
|
||||
final ListPreference durations = (ListPreference) findPreference(
|
||||
final ListPreference durations = findPreference(
|
||||
getString(R.string.seek_duration_key));
|
||||
durations.setEntryValues(displayedDurationValues.toArray(new CharSequence[0]));
|
||||
durations.setEntries(displayedDescriptionValues.toArray(new CharSequence[0]));
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.schabi.newpipe.settings.tabs;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
|
|
|
@ -236,7 +236,7 @@ public class DataReader {
|
|||
|
||||
if (read != amount) {
|
||||
throw new EOFException("Truncated stream, missing "
|
||||
+ String.valueOf(amount - read) + " bytes");
|
||||
+ (amount - read) + " bytes");
|
||||
}
|
||||
|
||||
for (int i = 0; i < amount; i++) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.schabi.newpipe.streams.io.SharpStream;
|
|||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
|
@ -259,11 +259,7 @@ public class Mp4DashReader {
|
|||
}
|
||||
|
||||
private String boxName(final int type) {
|
||||
try {
|
||||
return new String(ByteBuffer.allocate(4).putInt(type).array(), "UTF-8");
|
||||
} catch (final UnsupportedEncodingException e) {
|
||||
return "0x" + Integer.toHexString(type);
|
||||
}
|
||||
return new String(ByteBuffer.allocate(4).putInt(type).array(), StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
private Box readBox() throws IOException {
|
||||
|
|
|
@ -293,7 +293,7 @@ public class WebMReader {
|
|||
if (metadataExpected && (obj.info == null || obj.tracks == null)) {
|
||||
throw new RuntimeException(
|
||||
"Cluster element found without Info and/or Tracks element at position "
|
||||
+ String.valueOf(ref.offset));
|
||||
+ ref.offset);
|
||||
}
|
||||
|
||||
return obj;
|
||||
|
@ -389,7 +389,7 @@ public class WebMReader {
|
|||
|
||||
final Element elem = untilElement(ref, ID_TIMECODE);
|
||||
if (elem == null) {
|
||||
throw new NoSuchElementException("Cluster at " + String.valueOf(ref.offset)
|
||||
throw new NoSuchElementException("Cluster at " + ref.offset
|
||||
+ " without Timecode element");
|
||||
}
|
||||
obj.timecode = readNumber(elem);
|
||||
|
@ -520,7 +520,7 @@ public class WebMReader {
|
|||
|
||||
currentSimpleBlock = readSimpleBlock(elem);
|
||||
if (currentSimpleBlock.trackNumber == tracks[selectedTrack].trackNumber) {
|
||||
currentSimpleBlock.data = stream.getView((int) currentSimpleBlock.dataSize);
|
||||
currentSimpleBlock.data = stream.getView(currentSimpleBlock.dataSize);
|
||||
|
||||
// calculate the timestamp in nanoseconds
|
||||
currentSimpleBlock.absoluteTimeCodeNs = currentSimpleBlock.relativeTimeCode
|
||||
|
|
|
@ -162,13 +162,9 @@ public final class AnimationUtils {
|
|||
.ofObject(new ArgbEvaluator(), colorStart, colorEnd);
|
||||
viewPropertyAnimator.setInterpolator(new FastOutSlowInInterpolator());
|
||||
viewPropertyAnimator.setDuration(duration);
|
||||
viewPropertyAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(final ValueAnimator animation) {
|
||||
viewPropertyAnimator.addUpdateListener(animation ->
|
||||
ViewCompat.setBackgroundTintList(view,
|
||||
new ColorStateList(empty, new int[]{(int) animation.getAnimatedValue()}));
|
||||
}
|
||||
});
|
||||
new ColorStateList(empty, new int[]{(int) animation.getAnimatedValue()})));
|
||||
viewPropertyAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(final Animator animation) {
|
||||
|
@ -205,12 +201,8 @@ public final class AnimationUtils {
|
|||
.ofObject(new ArgbEvaluator(), colorStart, colorEnd);
|
||||
viewPropertyAnimator.setInterpolator(new FastOutSlowInInterpolator());
|
||||
viewPropertyAnimator.setDuration(duration);
|
||||
viewPropertyAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(final ValueAnimator animation) {
|
||||
view.setTextColor((int) animation.getAnimatedValue());
|
||||
}
|
||||
});
|
||||
viewPropertyAnimator.addUpdateListener(animation ->
|
||||
view.setTextColor((int) animation.getAnimatedValue()));
|
||||
viewPropertyAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(final Animator animation) {
|
||||
|
@ -430,7 +422,7 @@ public final class AnimationUtils {
|
|||
final long duration, final long delay,
|
||||
final Runnable execOnEnd) {
|
||||
if (enterOrExit) {
|
||||
view.setTranslationY(-view.getHeight() / 2);
|
||||
view.setTranslationY(-view.getHeight() / 2.0f);
|
||||
view.setAlpha(0f);
|
||||
view.animate()
|
||||
.setInterpolator(new FastOutSlowInInterpolator()).alpha(1f).translationY(0)
|
||||
|
@ -445,7 +437,7 @@ public final class AnimationUtils {
|
|||
}).start();
|
||||
} else {
|
||||
view.animate().setInterpolator(new FastOutSlowInInterpolator())
|
||||
.alpha(0f).translationY(-view.getHeight() / 2)
|
||||
.alpha(0f).translationY(-view.getHeight() / 2.0f)
|
||||
.setDuration(duration).setStartDelay(delay)
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,8 @@ import android.content.pm.PackageManager;
|
|||
import android.content.res.Configuration;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Build;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.TypedValue;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -72,4 +74,17 @@ public final class DeviceUtils {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Compares current status bar height with default status bar height in Android and decides,
|
||||
* does the device has cutout or not
|
||||
* */
|
||||
public static boolean hasCutout(final float statusBarHeight, final DisplayMetrics metrics) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
final float defaultStatusBarHeight = TypedValue.applyDimension(
|
||||
TypedValue.COMPLEX_UNIT_DIP, 25, metrics);
|
||||
return statusBarHeight > defaultStatusBarHeight;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.schabi.newpipe.util;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.schabi.newpipe.util;
|
|||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
|
|
|
@ -5,7 +5,7 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.schabi.newpipe.util;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.grack.nanojson.JsonArray;
|
||||
import com.grack.nanojson.JsonObject;
|
||||
|
|
|
@ -26,10 +26,8 @@ public final class PermissionHelper {
|
|||
private PermissionHelper() { }
|
||||
|
||||
public static boolean checkStoragePermissions(final Activity activity, final int requestCode) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
if (!checkReadStoragePermissions(activity, requestCode)) {
|
||||
return false;
|
||||
}
|
||||
if (!checkReadStoragePermissions(activity, requestCode)) {
|
||||
return false;
|
||||
}
|
||||
return checkWriteStoragePermissions(activity, requestCode);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,7 @@ public class RelatedStreamInfo extends ListInfo<InfoItem> {
|
|||
info.getOriginalUrl(), info.getUrl(), info.getId(), Collections.emptyList(), null);
|
||||
final RelatedStreamInfo relatedStreamInfo = new RelatedStreamInfo(
|
||||
info.getServiceId(), handler, info.getName());
|
||||
final List<InfoItem> streams = new ArrayList<>();
|
||||
streams.addAll(info.getRelatedStreams());
|
||||
final List<InfoItem> streams = new ArrayList<>(info.getRelatedStreams());
|
||||
relatedStreamInfo.setRelatedItems(streams);
|
||||
return relatedStreamInfo;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.schabi.newpipe.util;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.StringRes;
|
||||
|
|
|
@ -36,7 +36,6 @@ import org.schabi.newpipe.MainActivity;
|
|||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
@ -254,12 +253,8 @@ public final class StateSaver {
|
|||
return new SavedState(prefixFileName, file.getAbsolutePath());
|
||||
} else {
|
||||
// Delete any file that contains the prefix
|
||||
final File[] files = cacheDir.listFiles(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(final File dir, final String name) {
|
||||
return name.contains(prefixFileName);
|
||||
}
|
||||
});
|
||||
final File[] files = cacheDir.listFiles((dir, name) ->
|
||||
name.contains(prefixFileName));
|
||||
for (final File fileToDelete : files) {
|
||||
fileToDelete.delete();
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class TLSSocketFactoryCompat extends SSLSocketFactory {
|
|||
}
|
||||
|
||||
private Socket enableTLSOnSocket(final Socket socket) {
|
||||
if (socket != null && (socket instanceof SSLSocket)) {
|
||||
if (socket instanceof SSLSocket) {
|
||||
((SSLSocket) socket).setEnabledProtocols(new String[]{"TLSv1.1", "TLSv1.2"});
|
||||
}
|
||||
return socket;
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.schabi.newpipe.util;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.TypedValue;
|
||||
import android.view.ContextThemeWrapper;
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ public final class FocusOverlayView extends Drawable implements
|
|||
// keyboard META key for moving between clusters). We have to fix this unfortunate accident
|
||||
// While we are at it, let's deal with touchscreenBlocksFocus too.
|
||||
|
||||
if (Build.VERSION.SDK_INT < 26) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -155,13 +155,13 @@ public class LargeTextMovementMethod extends LinkMovementMethod {
|
|||
int bestStart = -1;
|
||||
int bestEnd = -1;
|
||||
|
||||
for (int i = 0; i < candidates.length; i++) {
|
||||
final int start = buffer.getSpanStart(candidates[i]);
|
||||
final int end = buffer.getSpanEnd(candidates[i]);
|
||||
for (final ClickableSpan candidate : candidates) {
|
||||
final int start = buffer.getSpanStart(candidate);
|
||||
final int end = buffer.getSpanEnd(candidate);
|
||||
|
||||
if ((end < selEnd || selStart == selEnd) && start >= visibleStart) {
|
||||
if (end > bestEnd) {
|
||||
bestStart = buffer.getSpanStart(candidates[i]);
|
||||
bestStart = buffer.getSpanStart(candidate);
|
||||
bestEnd = end;
|
||||
}
|
||||
}
|
||||
|
@ -224,14 +224,14 @@ public class LargeTextMovementMethod extends LinkMovementMethod {
|
|||
int bestStart = Integer.MAX_VALUE;
|
||||
int bestEnd = Integer.MAX_VALUE;
|
||||
|
||||
for (int i = 0; i < candidates.length; i++) {
|
||||
final int start = buffer.getSpanStart(candidates[i]);
|
||||
final int end = buffer.getSpanEnd(candidates[i]);
|
||||
for (final ClickableSpan candidate : candidates) {
|
||||
final int start = buffer.getSpanStart(candidate);
|
||||
final int end = buffer.getSpanEnd(candidate);
|
||||
|
||||
if ((start > selStart || selStart == selEnd) && end <= visibleEnd) {
|
||||
if (start < bestStart) {
|
||||
bestStart = start;
|
||||
bestEnd = buffer.getSpanEnd(candidates[i]);
|
||||
bestEnd = buffer.getSpanEnd(candidate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ public class NewPipeRecyclerView extends RecyclerView {
|
|||
}
|
||||
|
||||
private boolean tryFocusFinder(final int direction) {
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
// Android 9 implemented bunch of handy changes to focus, that render code below less
|
||||
// useful, and also broke findNextFocusFromRect in way, that render this hack useless
|
||||
return false;
|
||||
|
|
|
@ -633,7 +633,7 @@ public class DownloadMission extends Mission {
|
|||
calculated = offsets[current < offsets.length ? current : (offsets.length - 1)] + length;
|
||||
calculated -= offsets[0];// don't count reserved space
|
||||
|
||||
return calculated > nearLength ? calculated : nearLength;
|
||||
return Math.max(calculated, nearLength);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,12 +30,12 @@ public class FileStream extends SharpStream {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[]) throws IOException {
|
||||
public int read(byte[] b) throws IOException {
|
||||
return source.read(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
return source.read(b, off, len);
|
||||
}
|
||||
|
||||
|
|
|
@ -315,6 +315,7 @@ public class StoredFileHelper implements Serializable {
|
|||
return false;
|
||||
|
||||
if (this.isInvalid() || storage.isInvalid()) {
|
||||
if (this.srcName == null || storage.srcName == null || this.srcType == null || storage.srcType == null) return false;
|
||||
return this.srcName.equalsIgnoreCase(storage.srcName) && this.srcType.equalsIgnoreCase(storage.srcType);
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public abstract class Postprocessing implements Serializable {
|
|||
mission.done = 0;
|
||||
|
||||
long length = mission.storage.length() - mission.offsets[0];
|
||||
mission.length = length > mission.nearLength ? length : mission.nearLength;
|
||||
mission.length = Math.max(length, mission.nearLength);
|
||||
|
||||
final ProgressReport readProgress = (long position) -> {
|
||||
position -= mission.offsets[0];
|
||||
|
|
|
@ -24,7 +24,7 @@ import android.os.Handler.Callback;
|
|||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
import android.os.Parcelable;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.widget.Toast;
|
||||
|
@ -160,7 +160,7 @@ public class DownloadManagerService extends Service {
|
|||
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
mConnectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
mNetworkStateListenerL = new ConnectivityManager.NetworkCallback() {
|
||||
@Override
|
||||
public void onAvailable(Network network) {
|
||||
|
@ -240,7 +240,7 @@ public class DownloadManagerService extends Service {
|
|||
|
||||
manageLock(false);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
mConnectivityManager.unregisterNetworkCallback(mNetworkStateListenerL);
|
||||
else
|
||||
unregisterReceiver(mNetworkStateListener);
|
||||
|
@ -466,7 +466,7 @@ public class DownloadManagerService extends Service {
|
|||
if (downloadDoneCount < 1) {
|
||||
downloadDoneList.append(name);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
downloadDoneNotification.setContentTitle(getString(R.string.app_name));
|
||||
} else {
|
||||
downloadDoneNotification.setContentTitle(null);
|
||||
|
@ -505,7 +505,7 @@ public class DownloadManagerService extends Service {
|
|||
.setContentIntent(mOpenDownloadList);
|
||||
}
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
downloadFailedNotification.setContentTitle(getString(R.string.app_name));
|
||||
downloadFailedNotification.setStyle(new NotificationCompat.BigTextStyle()
|
||||
.bigText(getString(R.string.download_failed).concat(": ").concat(mission.storage.getName())));
|
||||
|
|
|
@ -49,6 +49,7 @@ import java.io.File;
|
|||
import java.lang.ref.WeakReference;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
import us.shandian.giga.get.DownloadMission;
|
||||
|
@ -302,9 +303,7 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
|
|||
float averageSpeed = speed;
|
||||
|
||||
if (h.lastSpeedIdx < 0) {
|
||||
for (int i = 0; i < h.lastSpeed.length; i++) {
|
||||
h.lastSpeed[i] = speed;
|
||||
}
|
||||
Arrays.fill(h.lastSpeed, speed);
|
||||
h.lastSpeedIdx = 0;
|
||||
} else {
|
||||
for (int i = 0; i < h.lastSpeed.length; i++) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import android.net.Uri;
|
|||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -97,7 +97,7 @@ public class MissionsFragment extends Fragment {
|
|||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View v = inflater.inflate(R.layout.missions, container, false);
|
||||
|
||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(requireActivity());
|
||||
mLinear = mPrefs.getBoolean("linear", false);
|
||||
|
||||
// Bind the service
|
||||
|
|
|
@ -27,6 +27,6 @@
|
|||
android:switchPadding="5dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@android:color/tab_indicator_text"
|
||||
android:text="@string/autoplay_title" />
|
||||
android:text="@string/auto_queue_toggle" />
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<string name="show_play_with_kodi_title">عرض خيار التشغيل بواسطة كودي</string>
|
||||
<string name="theme_title">السمة</string>
|
||||
<string name="upload_date_text">تم النشر بتاريخ %1$s</string>
|
||||
<string name="url_not_supported_toast">رابط URL غير معتمد</string>
|
||||
<string name="unsupported_url">رابط URL غير معتمد</string>
|
||||
<string name="use_external_audio_player_title">استخدام مشغل صوت خارجي</string>
|
||||
<string name="use_external_video_player_title">استخدام مشغل فيديو خارجي</string>
|
||||
<string name="use_tor_summary">(إختبارية) إجراء التنزيلات من خلال استخدام بروكسي Tor لزيادة الخصوصية ( تشغيل الفيديو المباشر غير مدعوم حتى الأن ).</string>
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
<string name="playback_tempo">Tempu</string>
|
||||
<string name="playback_pitch">Tonu</string>
|
||||
<string name="decline">Refugar</string>
|
||||
<string name="url_not_supported_toast">La URL nun se sofita</string>
|
||||
<string name="unsupported_url">La URL nun se sofita</string>
|
||||
<string name="background_player_playing_toast">Reproduciendo en segundu planu</string>
|
||||
<string name="popup_playing_toast">Reproduciendo nel mou ventanu</string>
|
||||
<string name="enable_search_history_summary">Atroxa llocalmente les consultes de gueta</string>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<string name="black_theme_title">黑色</string>
|
||||
<string name="download_dialog_title">下载</string>
|
||||
<string name="next_video_title">下一个</string>
|
||||
<string name="url_not_supported_toast">不支持的 URL</string>
|
||||
<string name="unsupported_url">不支持的 URL</string>
|
||||
<string name="settings_category_appearance_title">外观</string>
|
||||
<string name="settings_category_other_title">其他</string>
|
||||
<string name="all">全部</string>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<string name="show_next_and_similar_title">\"Наступнае\" и \"Прапанаванае\" відэа</string>
|
||||
<string name="show_hold_to_append_title">\"Зацісніце, каб дадаць\"</string>
|
||||
<string name="show_hold_to_append_summary">Паказаць падказку пры націсканні \"У акне\" ці \"У фоне\" на старонцы звестак аб відэа</string>
|
||||
<string name="url_not_supported_toast">URL не падтрымліваецца</string>
|
||||
<string name="unsupported_url">URL не падтрымліваецца</string>
|
||||
<string name="default_content_country_title">Краіна кантэнту па змаўчанні</string>
|
||||
<string name="service_title">Сэрвіс</string>
|
||||
<string name="content_language_title">Мова кантэнту па змаўчанні</string>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<string name="next_video_title">Следващ клип</string>
|
||||
<string name="show_next_and_similar_title">Показвай „следващ“ и „подобни“</string>
|
||||
<string name="show_hold_to_append_title">Показвай съвет „задръж за добавяне“</string>
|
||||
<string name="url_not_supported_toast">Непознат URL</string>
|
||||
<string name="unsupported_url">Непознат URL</string>
|
||||
<string name="content_language_title">Език на съдържанието по подразбиране</string>
|
||||
<string name="settings_category_player_title">Плейър</string>
|
||||
<string name="settings_category_player_behavior_title">Поведение</string>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<string name="download_dialog_title">ডাউনলোড</string>
|
||||
<string name="next_video_title">পরবর্তী ভিডিও</string>
|
||||
<string name="show_next_and_similar_title">পরবর্তী এবং অনুরূপ ভিডিওগুলি দেখাও</string>
|
||||
<string name="url_not_supported_toast">URL সমর্থিত নয়</string>
|
||||
<string name="unsupported_url">URL সমর্থিত নয়</string>
|
||||
<string name="content_language_title">কন্টেন্ট এর জন্য পছন্দসই ভাষা</string>
|
||||
<string name="settings_category_video_audio_title">ভিডিও এবং অডিও</string>
|
||||
<string name="settings_category_popup_title">পপআপ</string>
|
||||
|
|
|
@ -279,7 +279,7 @@
|
|||
<string name="enable_search_history_summary">Emmagatzema les cerques localment</string>
|
||||
<string name="enable_watch_history_summary">Crea un historial de vídeos visualitzats</string>
|
||||
<string name="resume_on_audio_focus_gain_title">Reprèn automàticament</string>
|
||||
<string name="url_not_supported_toast">Aquest URL no és compatible</string>
|
||||
<string name="unsupported_url">Aquest URL no és compatible</string>
|
||||
<string name="error_report_title">Informe d\'error</string>
|
||||
<string name="later">Més tard</string>
|
||||
<string name="filter">Filtra</string>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<string name="download_dialog_title">Stáhnout</string>
|
||||
<string name="next_video_title">Další</string>
|
||||
<string name="show_next_and_similar_title">Zobrazovat \'další\' a \'podobná\' videa</string>
|
||||
<string name="url_not_supported_toast">URL není podporováno</string>
|
||||
<string name="unsupported_url">URL není podporováno</string>
|
||||
<string name="content_language_title">Preferovaný jazyk obsahu</string>
|
||||
<string name="settings_category_video_audio_title">Video a zvuk</string>
|
||||
<string name="settings_category_appearance_title">Vzhled</string>
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<string name="show_next_and_similar_title">Vis \'Næste\' og \'Lignende\' videoer</string>
|
||||
<string name="show_hold_to_append_title">Vis \"Hold for at tilføje\"-tip</string>
|
||||
<string name="show_hold_to_append_summary">Vis et tip når der trykkes på baggrunds- eller pop op-knappen på siden med videodetaljer</string>
|
||||
<string name="url_not_supported_toast">Denne webadresse er ikke understøttet</string>
|
||||
<string name="unsupported_url">Denne webadresse er ikke understøttet</string>
|
||||
<string name="default_content_country_title">Standardland for indhold</string>
|
||||
<string name="service_title">Tjeneste</string>
|
||||
<string name="content_language_title">Standardsprog for indhold</string>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<string name="download_dialog_title">Herunterladen</string>
|
||||
<string name="next_video_title">Nächste</string>
|
||||
<string name="show_next_and_similar_title">„Nächste“ und „Ähnliche“ Videos anzeigen</string>
|
||||
<string name="url_not_supported_toast">Nicht unterstützte URL</string>
|
||||
<string name="unsupported_url">Nicht unterstützte URL</string>
|
||||
<string name="settings_category_video_audio_title">Video & Audio</string>
|
||||
<string name="content_language_title">Bevorzugte Sprache des Inhalts</string>
|
||||
<string name="list_thumbnail_view_description">Video-Vorschaubild</string>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<string name="download_dialog_title">Λήψη</string>
|
||||
<string name="next_video_title">Επόμενο</string>
|
||||
<string name="show_next_and_similar_title">Εμφάνιση \"Επόμενου\" και \"Σχετικών\" βίντεο</string>
|
||||
<string name="url_not_supported_toast">Δεν υποστηρίζεται η διεύθυνση URL</string>
|
||||
<string name="unsupported_url">Δεν υποστηρίζεται η διεύθυνση URL</string>
|
||||
<string name="content_language_title">Προεπιλεγμένη γλώσσα περιεχομένου</string>
|
||||
<string name="settings_category_video_audio_title">Βίντεο & Ήχος</string>
|
||||
<string name="settings_category_appearance_title">Εμφάνιση</string>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<string name="light_theme_title">Luma</string>
|
||||
<string name="download_dialog_title">Elŝuti</string>
|
||||
<string name="next_video_title">Vica filmeto</string>
|
||||
<string name="url_not_supported_toast">Ligilo ne subtenita</string>
|
||||
<string name="unsupported_url">Ligilo ne subtenita</string>
|
||||
<string name="content_language_title">Preferata enhavlingvo</string>
|
||||
<string name="settings_category_video_audio_title">Filmeto kaj sono</string>
|
||||
<string name="settings_category_appearance_title">Apero</string>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<string name="default_audio_format_title">Formato de audio predeterminado</string>
|
||||
<string name="download_dialog_title">Descargar</string>
|
||||
<string name="next_video_title">Siguiente</string>
|
||||
<string name="url_not_supported_toast">No se admite el URL</string>
|
||||
<string name="unsupported_url">No se admite el URL</string>
|
||||
<string name="use_external_video_player_title">Usar reproductor de vídeo externo</string>
|
||||
<string name="use_external_audio_player_title">Usar reproductor de audio externo</string>
|
||||
<string name="theme_title">Tema</string>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<string name="show_next_and_similar_title">Kuva \'järgmine\' ja \'sarnased\' videod</string>
|
||||
<string name="show_hold_to_append_title">Kuva vihjet \"lisamiseks hoia\"</string>
|
||||
<string name="show_hold_to_append_summary">Kuva vihje, kui videoandmete lehel vajutatakse tausta või hüpikakna nupule</string>
|
||||
<string name="url_not_supported_toast">Mitte toetatud URL</string>
|
||||
<string name="unsupported_url">Mitte toetatud URL</string>
|
||||
<string name="default_content_country_title">Sisu vaikimisi riik</string>
|
||||
<string name="service_title">Teenus</string>
|
||||
<string name="content_language_title">Sisu vaikimisi keel</string>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<string name="download_dialog_title">Deskargatu</string>
|
||||
<string name="next_video_title">Hurrengoa</string>
|
||||
<string name="show_next_and_similar_title">Erakutsi \'hurrengo\' eta \'antzeko\' bideoak</string>
|
||||
<string name="url_not_supported_toast">URLak ez du euskarririk</string>
|
||||
<string name="unsupported_url">URLak ez du euskarririk</string>
|
||||
<string name="content_language_title">Edukiaren hizkuntz lehenetsia</string>
|
||||
<string name="settings_category_video_audio_title">Bideoa eta Audioa</string>
|
||||
<string name="play_btn_text">Erreproduzitu</string>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<string name="download_dialog_title">بارگیری</string>
|
||||
<string name="next_video_title">بعدی</string>
|
||||
<string name="show_next_and_similar_title">نماش ویدیوهای «بعدی» و «مشابه»</string>
|
||||
<string name="url_not_supported_toast">نشانی پشتیبانی نشده</string>
|
||||
<string name="unsupported_url">نشانی پشتیبانی نشده</string>
|
||||
<string name="content_language_title">زبان محتوای ترجیحی</string>
|
||||
<string name="settings_category_video_audio_title">ویدیو و صدا</string>
|
||||
<string name="settings_category_appearance_title">ظاهر</string>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<string name="download_dialog_title">Lataus</string>
|
||||
<string name="next_video_title">Seuraava</string>
|
||||
<string name="show_next_and_similar_title">Näytä seuraavia ja samankaltaisia videoita</string>
|
||||
<string name="url_not_supported_toast">URL ei tuettu</string>
|
||||
<string name="unsupported_url">URL ei tuettu</string>
|
||||
<string name="content_language_title">Oletus-sisällon kieli</string>
|
||||
<string name="settings_category_player_title">Soitin</string>
|
||||
<string name="settings_category_player_behavior_title">Käyttäytyminen</string>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<string name="download_dialog_title">Télécharger</string>
|
||||
<string name="next_video_title">Suivant</string>
|
||||
<string name="show_next_and_similar_title">Afficher les vidéos « Suivantes » et « Similaires »</string>
|
||||
<string name="url_not_supported_toast">URL non pris en charge</string>
|
||||
<string name="unsupported_url">URL non pris en charge</string>
|
||||
<string name="settings_category_video_audio_title">Vidéo et audio</string>
|
||||
<string name="settings_category_other_title">Autre</string>
|
||||
<string name="list_thumbnail_view_description">Miniature d’aperçu vidéo</string>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<string name="show_next_and_similar_title">Mostrar vídeos «seguintes» e «semellantes»</string>
|
||||
<string name="show_hold_to_append_title">Mostrar a suxestión «Manteña presionado para engadir á cola»</string>
|
||||
<string name="show_hold_to_append_summary">Mostrar unha suxestión ao premer o botón de segundo plano ou o de popup na páxina de detalles do vídeo</string>
|
||||
<string name="url_not_supported_toast">Este URL non está soportado</string>
|
||||
<string name="unsupported_url">Este URL non está soportado</string>
|
||||
<string name="default_content_country_title">País predeterminado para o contido</string>
|
||||
<string name="service_title">Servizo</string>
|
||||
<string name="settings_category_player_title">Reprodutor</string>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<string name="download_dialog_title">הורדה</string>
|
||||
<string name="next_video_title">הבא</string>
|
||||
<string name="show_next_and_similar_title">להציג סרטונים דומים ובאים בתור</string>
|
||||
<string name="url_not_supported_toast">כתובת לא נתמכת</string>
|
||||
<string name="unsupported_url">כתובת לא נתמכת</string>
|
||||
<string name="content_language_title">שפת התוכן המועדפת</string>
|
||||
<string name="settings_category_video_audio_title">סרטונים ושמע</string>
|
||||
<string name="settings_category_popup_title">חלון צף</string>
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
<string name="show_next_and_similar_title">\'अगला\' और \'पहले समान\' वीडियो दिखाए</string>
|
||||
<string name="show_hold_to_append_title">\"जोड़ने के लिए पकड़ें रहे\" दिखाए</string>
|
||||
<string name="show_hold_to_append_summary">जब बैकग्राउंड और पॉपअप बटन विडियो के विवरण पन्ने में दबाई जाए तो tip को दिखाए</string>
|
||||
<string name="url_not_supported_toast">ये वाला URL इसमें नहीं चलेगा</string>
|
||||
<string name="unsupported_url">ये वाला URL इसमें नहीं चलेगा</string>
|
||||
<string name="content_language_title">डिफ़ॉल्ट विषय की भाषा</string>
|
||||
<string name="settings_category_player_title">प्लेयर</string>
|
||||
<string name="settings_category_player_behavior_title">चाल चलन</string>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<string name="download_dialog_title">Preuzmi</string>
|
||||
<string name="next_video_title">Sljedeće</string>
|
||||
<string name="show_next_and_similar_title">Prikaži \'Sljedeće\' i \'Slične\' videozapise</string>
|
||||
<string name="url_not_supported_toast">URL nije podržan</string>
|
||||
<string name="unsupported_url">URL nije podržan</string>
|
||||
<string name="content_language_title">Zadani jezik sadržaja</string>
|
||||
<string name="settings_category_video_audio_title">Video i zvuk</string>
|
||||
<string name="settings_category_popup_title">Skočni prozor</string>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<string name="default_audio_format_title">Alapértelmezett hang formátum</string>
|
||||
<string name="download_dialog_title">Letöltés</string>
|
||||
<string name="next_video_title">Következő</string>
|
||||
<string name="url_not_supported_toast">Nem támogatott webcím</string>
|
||||
<string name="unsupported_url">Nem támogatott webcím</string>
|
||||
<string name="use_external_video_player_title">Külső videólejátszó használata</string>
|
||||
<string name="use_external_audio_player_title">Külső hanglejátszó használata</string>
|
||||
<string name="download_path_audio_dialog_title">Válaszd ki a hangfájlok letöltési helyét</string>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<string name="next_video_title">Sequente</string>
|
||||
<string name="autoplay_title">Reproduction automatic</string>
|
||||
<string name="show_next_and_similar_title">Monstrar le videos sequente e simile</string>
|
||||
<string name="url_not_supported_toast">URL non supportate</string>
|
||||
<string name="unsupported_url">URL non supportate</string>
|
||||
<string name="default_content_country_title">Pais predefinite del contentos</string>
|
||||
<string name="service_title">Servicio</string>
|
||||
<string name="content_language_title">Lingua predefinite del contento</string>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<string name="download_dialog_title">Unduh</string>
|
||||
<string name="next_video_title">Berikutnya</string>
|
||||
<string name="show_next_and_similar_title">Tampilkan video \'Berikutnya\' dan \'Serupa\'</string>
|
||||
<string name="url_not_supported_toast">URL tidak didukung</string>
|
||||
<string name="unsupported_url">URL tidak didukung</string>
|
||||
<string name="content_language_title">Bahasa konten</string>
|
||||
<string name="settings_category_video_audio_title">Video & Audio</string>
|
||||
<string name="settings_category_appearance_title">Tampilan</string>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<string name="download_dialog_title">Scarica</string>
|
||||
<string name="next_video_title">Prossimo</string>
|
||||
<string name="show_next_and_similar_title">Mostra video \"Prossimo\" e \"Simili\"</string>
|
||||
<string name="url_not_supported_toast">URL non supportato</string>
|
||||
<string name="unsupported_url">URL non supportato</string>
|
||||
<string name="content_language_title">Lingua Predefinita per Contenuti</string>
|
||||
<string name="settings_category_video_audio_title">Video e Audio</string>
|
||||
<string name="list_thumbnail_view_description">Copertina di anteprima video</string>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue