Skip to content

Commit

Permalink
Temporary 0.27.2 fix from xray https://github.com/polymorphicshade/Tu…
Browse files Browse the repository at this point in the history
  • Loading branch information
iecxiv committed Jul 27, 2024
1 parent b42cade commit e884ead
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
resValue "string", "app_name", "Tubular"
minSdk 21
targetSdk 33
versionCode 998
versionName "0.27.1"
versionCode 999
versionName "0.27.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -205,7 +205,7 @@ dependencies {
// name and the commit hash with the commit hash of the (pushed) commit you want to test
// This works thanks to JitPack: https://jitpack.io/
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
implementation 'com.github.polymorphicshade:TubularExtractor:4faa5669b67d62526c3af39e11bb9d29d284bcd0'
implementation 'com.github.xray:TubularExtractor:d8abe3be8e115857fe830c8b4dce9bd3fd42287c'
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'

/** Checkstyle **/
Expand Down
1 change: 1 addition & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
-keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; }
-keep class org.mozilla.javascript.** { *; }
-keep class org.mozilla.classfile.ClassFileWriter
-dontwarn org.mozilla.javascript.JavaToJSONConverters
-dontwarn org.mozilla.javascript.tools.**

## Rules for ExoPlayer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import org.schabi.newpipe.extractor.utils.Utils;
import org.schabi.newpipe.util.ThemeHelper;

import java.io.UnsupportedEncodingException;

/*
* Created by beneth <bmauduit@beneth.fr> on 06.12.16.
*
Expand Down Expand Up @@ -190,11 +188,10 @@ private void handleCookiesFromUrl(@Nullable final String url) {
String abuseCookie = url.substring(abuseStart + 13, abuseEnd);
abuseCookie = Utils.decodeUrlUtf8(abuseCookie);
handleCookies(abuseCookie);
} catch (UnsupportedEncodingException | StringIndexOutOfBoundsException e) {
} catch (IllegalArgumentException | StringIndexOutOfBoundsException e) {
if (MainActivity.DEBUG) {
e.printStackTrace();
Log.d(TAG, "handleCookiesFromUrl: invalid google abuse starting at "
+ abuseStart + " and ending at " + abuseEnd + " for url " + url);
Log.e(TAG, "handleCookiesFromUrl: invalid google abuse starting at "
+ abuseStart + " and ending at " + abuseEnd + " for url " + url, e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public class MediaSessionPlayerUi extends PlayerUi
implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = "MediaSessUi";

@Nullable
private MediaSessionCompat mediaSession;
@Nullable
private MediaSessionConnector sessionConnector;

private final String ignoreHardwareMediaButtonsKey;
Expand Down Expand Up @@ -198,6 +200,11 @@ private void updateMediaSessionActions() {
return;
}

if (sessionConnector == null) {
// sessionConnector will be null after destroyPlayer is called
return;
}

// only use the fourth and fifth actions (the settings page also shows only the last 2 on
// Android 13+)
final List<NotificationActionData> newNotificationActions = IntStream.of(3, 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;

public class DownloadSettingsFragment extends BasePreferenceFragment {
Expand Down Expand Up @@ -125,7 +124,7 @@ private void showPathInSummary(final String prefKey, @StringRes final int defaul

try {
rawUri = decodeUrlUtf8(rawUri);
} catch (final UnsupportedEncodingException e) {
} catch (final IllegalArgumentException e) {
// nothing to do
}

Expand Down

0 comments on commit e884ead

Please sign in to comment.