Merge branch 'dev' into dev
This commit is contained in:
commit
e94981e6f7
18 changed files with 241 additions and 443 deletions
23
app/src/main/java/org/schabi/newpipe/util/KoreUtil.java
Normal file
23
app/src/main/java/org/schabi/newpipe/util/KoreUtil.java
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package org.schabi.newpipe.util;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
|
||||
|
||||
public class KoreUtil {
|
||||
private KoreUtil() { }
|
||||
|
||||
public static void showInstallKoreDialog(final Context context) {
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setMessage(R.string.kore_not_found)
|
||||
.setPositiveButton(R.string.install,
|
||||
(DialogInterface dialog, int which) -> NavigationHelper.installKore(context))
|
||||
.setNegativeButton(R.string.cancel, (DialogInterface dialog, int which) -> {
|
||||
});
|
||||
builder.create().show();
|
||||
}
|
||||
}
|
||||
|
|
@ -109,12 +109,14 @@ public class NavigationHelper {
|
|||
final float playbackPitch,
|
||||
final boolean playbackSkipSilence,
|
||||
@Nullable final String playbackQuality,
|
||||
final boolean resumePlayback) {
|
||||
final boolean resumePlayback,
|
||||
final boolean startPaused) {
|
||||
return getPlayerIntent(context, targetClazz, playQueue, playbackQuality, resumePlayback)
|
||||
.putExtra(BasePlayer.REPEAT_MODE, repeatMode)
|
||||
.putExtra(BasePlayer.PLAYBACK_SPEED, playbackSpeed)
|
||||
.putExtra(BasePlayer.PLAYBACK_PITCH, playbackPitch)
|
||||
.putExtra(BasePlayer.PLAYBACK_SKIP_SILENCE, playbackSkipSilence);
|
||||
.putExtra(BasePlayer.PLAYBACK_SKIP_SILENCE, playbackSkipSilence)
|
||||
.putExtra(BasePlayer.START_PAUSED, startPaused);
|
||||
}
|
||||
|
||||
public static void playOnMainPlayer(final Context context, final PlayQueue queue, final boolean resumePlayback) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue