Merge pull request #8769 from Isira-Seneviratne/New_Utils_methods

Use new NPE UTF8 Utils methods
This commit is contained in:
Stypox 2023-01-02 17:59:26 +01:00 committed by GitHub
commit 8fa949537b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View file

@ -1,5 +1,6 @@
package org.schabi.newpipe.settings;
import static org.schabi.newpipe.extractor.utils.Utils.decodeUrlUtf8;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
import android.app.Activity;
@ -31,8 +32,6 @@ import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
public class DownloadSettingsFragment extends BasePreferenceFragment {
public static final boolean IGNORE_RELEASE_ON_OLD_PATH = true;
@ -125,7 +124,7 @@ public class DownloadSettingsFragment extends BasePreferenceFragment {
}
try {
rawUri = URLDecoder.decode(rawUri, StandardCharsets.UTF_8.name());
rawUri = decodeUrlUtf8(rawUri);
} catch (final UnsupportedEncodingException e) {
// nothing to do
}