Refactoring:
* renamed VideoInfoItem to VideoPreviewInfo * moved streaming service-related classes into their own, new package services * added javadoc to some classes and methods (where functionality is known well enough to explain) * De-duplicated common fields between VideoInfo and VideoPreviewInfo by moving them into a common superclass: AbstractVideoInfo * Removed 2 methods which only call super(), and therefore are unnecessary: PlayVideoActivity.onResume() and PlayVideoActivity.onPostCreate(Bundle)
This commit is contained in:
parent
975a3e8103
commit
320a4e2351
19 changed files with 136 additions and 108 deletions
|
|
@ -37,6 +37,10 @@ import java.util.Date;
|
|||
import java.util.Locale;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.schabi.newpipe.services.Extractor;
|
||||
import org.schabi.newpipe.services.ServiceList;
|
||||
import org.schabi.newpipe.services.StreamingService;
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
|
||||
|
|
@ -394,10 +398,12 @@ public class VideoItemDetailFragment extends Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**Returns the java.util.Locale object which corresponds to the locale set in NewPipe's preferences.
|
||||
* Currently not affected by the device's locale.*/
|
||||
public Locale getPreferredLocale() {
|
||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
String languageKey = getContext().getString(R.string.searchLanguage);
|
||||
String languageCode = "en";//i know the following lines defaults languageCode to "en", but java is picky about uninitialised values
|
||||
String languageCode = "en";//i know the following line defaults languageCode to "en", but java is picky about uninitialised values
|
||||
languageCode = sp.getString(languageKey, "en");
|
||||
|
||||
if(languageCode.length() == 2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue