mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-07-03 18:42:59 +00:00
Move migration to separate method
This commit is contained in:
parent
da106e2361
commit
980a35a708
@ -127,6 +127,11 @@ public class App extends Application {
|
||||
YoutubeStreamExtractor.setPoTokenProvider(PoTokenProviderImpl.INSTANCE);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 33) {
|
||||
ensureAppLanguagePreferenceIsMigrated(prefs);
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureAppLanguagePreferenceIsMigrated(final SharedPreferences prefs) {
|
||||
final String appLanguageDefaultValue = getString(R.string.default_localization_key);
|
||||
final String appLanguageKey = getString(R.string.app_language_key);
|
||||
final String appLanguageCurrentValue = prefs.getString(appLanguageKey, null);
|
||||
@ -144,7 +149,6 @@ public class App extends Application {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTerminate() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user