mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-24 00:50:32 +00:00
Fixing squid:S1118 - Utility classes should not have public constructors.
This commit is contained in:
parent
35e11e43de
commit
eb060602cd
@ -34,6 +34,9 @@ import java.util.Locale;
|
|||||||
|
|
||||||
public class Localization {
|
public class Localization {
|
||||||
|
|
||||||
|
private Localization() {
|
||||||
|
}
|
||||||
|
|
||||||
public static Locale getPreferredLocale(Context context) {
|
public static Locale getPreferredLocale(Context context) {
|
||||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
|
||||||
|
@ -33,6 +33,10 @@ import java.io.File;
|
|||||||
* Helper for global settings
|
* Helper for global settings
|
||||||
*/
|
*/
|
||||||
public class NewPipeSettings {
|
public class NewPipeSettings {
|
||||||
|
|
||||||
|
private NewPipeSettings() {
|
||||||
|
}
|
||||||
|
|
||||||
public static void initSettings(Context context) {
|
public static void initSettings(Context context) {
|
||||||
PreferenceManager.setDefaultValues(context, R.xml.settings, false);
|
PreferenceManager.setDefaultValues(context, R.xml.settings, false);
|
||||||
getVideoDownloadFolder(context);
|
getVideoDownloadFolder(context);
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Vector;
|
|||||||
|
|
||||||
public class DashMpdParser {
|
public class DashMpdParser {
|
||||||
|
|
||||||
|
private DashMpdParser() {
|
||||||
|
}
|
||||||
|
|
||||||
static class DashMpdParsingException extends ParsingException {
|
static class DashMpdParsingException extends ParsingException {
|
||||||
DashMpdParsingException(String message, Exception e) {
|
DashMpdParsingException(String message, Exception e) {
|
||||||
super(message, e);
|
super(message, e);
|
||||||
|
@ -32,6 +32,9 @@ import java.util.regex.Pattern;
|
|||||||
/** avoid using regex !!! */
|
/** avoid using regex !!! */
|
||||||
public class Parser {
|
public class Parser {
|
||||||
|
|
||||||
|
private Parser() {
|
||||||
|
}
|
||||||
|
|
||||||
public static class RegexException extends ParsingException {
|
public static class RegexException extends ParsingException {
|
||||||
public RegexException(String message) {
|
public RegexException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
|
@ -29,6 +29,10 @@ import org.schabi.newpipe.extractor.services.youtube.YoutubeService;
|
|||||||
|
|
||||||
@SuppressWarnings("ALL")
|
@SuppressWarnings("ALL")
|
||||||
public class ServiceList {
|
public class ServiceList {
|
||||||
|
|
||||||
|
private ServiceList() {
|
||||||
|
}
|
||||||
|
|
||||||
private static final String TAG = ServiceList.class.toString();
|
private static final String TAG = ServiceList.class.toString();
|
||||||
private static final StreamingService[] services = {
|
private static final StreamingService[] services = {
|
||||||
new YoutubeService(0)
|
new YoutubeService(0)
|
||||||
|
@ -23,6 +23,10 @@ import org.schabi.newpipe.extractor.ParsingException;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class YoutubeParsingHelper {
|
public class YoutubeParsingHelper {
|
||||||
|
|
||||||
|
private YoutubeParsingHelper() {
|
||||||
|
}
|
||||||
|
|
||||||
public static int parseDurationString(String input)
|
public static int parseDurationString(String input)
|
||||||
throws ParsingException, NumberFormatException {
|
throws ParsingException, NumberFormatException {
|
||||||
String[] splitInput = input.split(":");
|
String[] splitInput = input.split(":");
|
||||||
|
Loading…
Reference in New Issue
Block a user