Skip to content

Commit ee25b44

Browse files
authored
Merge pull request #13445 from TeamNewPipe/mergeDev
Merge dev into refactor
2 parents dd917ca + 43f40c4 commit ee25b44

14 files changed

Lines changed: 69 additions & 253 deletions

File tree

app/build.gradle.kts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@ val gitWorkingBranch = providers.exec {
2424
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
2525
}.standardOutput.asText.map { it.trim() }
2626

27-
java {
28-
toolchain {
29-
languageVersion = JavaLanguageVersion.of(17)
30-
}
31-
}
32-
3327
kotlin {
28+
jvmToolchain(21)
3429
compilerOptions {
3530
// TODO: Drop annotation default target when it is stable
3631
freeCompilerArgs.addAll(
@@ -142,13 +137,6 @@ ksp {
142137
// Custom dependency configuration for ktlint
143138
val ktlint by configurations.creating
144139

145-
// https://checkstyle.org/#JRE_and_JDK
146-
tasks.withType<Checkstyle>().configureEach {
147-
javaLauncher = javaToolchains.launcherFor {
148-
languageVersion = JavaLanguageVersion.of(21)
149-
}
150-
}
151-
152140
checkstyle {
153141
configDirectory = rootProject.file("checkstyle")
154142
isIgnoreFailures = false
@@ -220,7 +208,6 @@ aboutLibraries {
220208
// note: offline mode prevents the plugin from fetching licenses at build time, which would be
221209
// harmful for reproducible builds
222210
offlineMode = true
223-
duplicationMode = DuplicateMode.MERGE
224211
}
225212

226213
dependencies {

app/check-dependencies.gradle

Lines changed: 0 additions & 48 deletions
This file was deleted.

app/proguard-rules.pro

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
-dontwarn javax.script.**
1717
-keep class jdk.dynalink.** { *; }
1818
-dontwarn jdk.dynalink.**
19-
# Rules for jsoup
20-
# Ignore intended-to-be-optional re2j classes - only needed if using re2j for jsoup regex
21-
# jsoup safely falls back to JDK regex if re2j not on classpath, but has concrete re2j refs
22-
# See https://github.com/jhy/jsoup/issues/2459 - may be resolved in future, then this may be removed
23-
-dontwarn com.google.re2j.**
2419

2520
## Rules for ExoPlayer
2621
-keep class com.google.android.exoplayer2.** { *; }

app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2017-2024 NewPipe contributors <https://newpipe.net>
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
16
package org.schabi.newpipe.fragments.list.kiosk;
27

38
import android.os.Bundle;
@@ -33,30 +38,6 @@
3338

3439
import io.reactivex.rxjava3.core.Single;
3540

36-
/**
37-
* Created by Christian Schabesberger on 23.09.17.
38-
* <p>
39-
* Copyright (C) Christian Schabesberger 2017 <chris.schabesberger@mailbox.org>
40-
* KioskFragment.java is part of NewPipe.
41-
* </p>
42-
* <p>
43-
* NewPipe is free software: you can redistribute it and/or modify
44-
* it under the terms of the GNU General Public License as published by
45-
* the Free Software Foundation, either version 3 of the License, or
46-
* (at your option) any later version.
47-
* </p>
48-
* <p>
49-
* NewPipe is distributed in the hope that it will be useful,
50-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
51-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52-
* GNU General Public License for more details.
53-
* </p>
54-
* <p>
55-
* You should have received a copy of the GNU General Public License
56-
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
57-
* </p>
58-
*/
59-
6041
public class KioskFragment extends BaseListInfoFragment<StreamInfoItem, KioskInfo> {
6142
@State
6243
String kioskId = "";

app/src/main/java/org/schabi/newpipe/player/Player.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,13 @@ public void play() {
17611761
}
17621762
}
17631763

1764+
if (isStopped()) {
1765+
// Some phones suspend a paused player after 10 minutes. This causes the player to
1766+
// enter STATE_IDLE, causing playback to fail. So we try to recover from that here.
1767+
setRecovery();
1768+
reloadPlayQueueManager();
1769+
}
1770+
17641771
simpleExoPlayer.play();
17651772
saveStreamProgressState();
17661773
}

app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2016-2026 NewPipe contributors <https://newpipe.net>
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
16
package org.schabi.newpipe.player.playqueue;
27

38
import android.content.Context;
@@ -22,30 +27,6 @@
2227
import io.reactivex.rxjava3.core.Observer;
2328
import io.reactivex.rxjava3.disposables.Disposable;
2429

25-
/**
26-
* Created by Christian Schabesberger on 01.08.16.
27-
* <p>
28-
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
29-
* InfoListAdapter.java is part of NewPipe.
30-
* </p>
31-
* <p>
32-
* NewPipe is free software: you can redistribute it and/or modify
33-
* it under the terms of the GNU General Public License as published by
34-
* the Free Software Foundation, either version 3 of the License, or
35-
* (at your option) any later version.
36-
* </p>
37-
* <p>
38-
* NewPipe is distributed in the hope that it will be useful,
39-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
40-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41-
* GNU General Public License for more details.
42-
* </p>
43-
* <p>
44-
* You should have received a copy of the GNU General Public License
45-
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
46-
* </p>
47-
*/
48-
4930
public class PlayQueueAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
5031
private static final String TAG = PlayQueueAdapter.class.toString();
5132

app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemHolder.java

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2016-2021 NewPipe contributors <https://newpipe.net>
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
16
package org.schabi.newpipe.player.playqueue;
27

38
import android.view.View;
@@ -8,30 +13,6 @@
813

914
import org.schabi.newpipe.R;
1015

11-
/**
12-
* Created by Christian Schabesberger on 01.08.16.
13-
* <p>
14-
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
15-
* StreamInfoItemHolder.java is part of NewPipe.
16-
* </p>
17-
* <p>
18-
* NewPipe is free software: you can redistribute it and/or modify
19-
* it under the terms of the GNU General Public License as published by
20-
* the Free Software Foundation, either version 3 of the License, or
21-
* (at your option) any later version.
22-
* </p>
23-
* <p>
24-
* NewPipe is distributed in the hope that it will be useful,
25-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
26-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27-
* GNU General Public License for more details.
28-
* </p>
29-
* <p>
30-
* You should have received a copy of the GNU General Public License
31-
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
32-
* </p>
33-
*/
34-
3516
public class PlayQueueItemHolder extends RecyclerView.ViewHolder {
3617
public final TextView itemVideoTitleView;
3718
public final TextView itemDurationView;

app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2017-2025 NewPipe contributors <https://newpipe.net>
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
16
package org.schabi.newpipe.settings;
27

38
import android.content.DialogInterface;
@@ -33,27 +38,6 @@
3338
import io.reactivex.rxjava3.disposables.Disposable;
3439
import io.reactivex.rxjava3.schedulers.Schedulers;
3540

36-
/**
37-
* Created by Christian Schabesberger on 26.09.17.
38-
* SelectChannelFragment.java is part of NewPipe.
39-
* <p>
40-
* NewPipe is free software: you can redistribute it and/or modify
41-
* it under the terms of the GNU General Public License as published by
42-
* the Free Software Foundation, either version 3 of the License, or
43-
* (at your option) any later version.
44-
* </p>
45-
* <p>
46-
* NewPipe is distributed in the hope that it will be useful,
47-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
48-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49-
* GNU General Public License for more details.
50-
* </p>
51-
* <p>
52-
* You should have received a copy of the GNU General Public License
53-
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
54-
* </p>
55-
*/
56-
5741
public class SelectChannelFragment extends DialogFragment {
5842

5943
private OnSelectedListener onSelectedListener = null;

app/src/main/java/org/schabi/newpipe/settings/SelectFeedGroupFragment.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2017-2025 NewPipe contributors <https://newpipe.net>
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
16
package org.schabi.newpipe.settings;
27

38
import android.content.DialogInterface;
@@ -30,27 +35,6 @@
3035
import io.reactivex.rxjava3.disposables.Disposable;
3136
import io.reactivex.rxjava3.schedulers.Schedulers;
3237

33-
/**
34-
* Created by Christian Schabesberger on 26.09.17.
35-
* SelectChannelFragment.java is part of NewPipe.
36-
* <p>
37-
* NewPipe is free software: you can redistribute it and/or modify
38-
* it under the terms of the GNU General Public License as published by
39-
* the Free Software Foundation, either version 3 of the License, or
40-
* (at your option) any later version.
41-
* </p>
42-
* <p>
43-
* NewPipe is distributed in the hope that it will be useful,
44-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
45-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46-
* GNU General Public License for more details.
47-
* </p>
48-
* <p>
49-
* You should have received a copy of the GNU General Public License
50-
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
51-
* </p>
52-
*/
53-
5438
public class SelectFeedGroupFragment extends DialogFragment {
5539

5640
private OnSelectedListener onSelectedListener = null;

app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2017-2022 NewPipe contributors <https://newpipe.net>
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
16
package org.schabi.newpipe.settings;
27

38
import android.os.Bundle;
@@ -25,27 +30,6 @@
2530
import java.util.List;
2631
import java.util.Vector;
2732

28-
/**
29-
* Created by Christian Schabesberger on 09.10.17.
30-
* SelectKioskFragment.java is part of NewPipe.
31-
* <p>
32-
* NewPipe is free software: you can redistribute it and/or modify
33-
* it under the terms of the GNU General Public License as published by
34-
* the Free Software Foundation, either version 3 of the License, or
35-
* (at your option) any later version.
36-
* </p>
37-
* <p>
38-
* NewPipe is distributed in the hope that it will be useful,
39-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
40-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41-
* GNU General Public License for more details.
42-
* </p>
43-
* <p>
44-
* You should have received a copy of the GNU General Public License
45-
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
46-
* </p>
47-
*/
48-
4933
public class SelectKioskFragment extends DialogFragment {
5034
private SelectKioskAdapter selectKioskAdapter = null;
5135

0 commit comments

Comments
 (0)