2020
2121package org .schabi .newpipe ;
2222
23- import static org .schabi .newpipe .util .Localization .assureCorrectAppLanguage ;
24-
2523import android .content .BroadcastReceiver ;
2624import android .content .Context ;
2725import android .content .Intent ;
@@ -142,6 +140,7 @@ protected void onCreate(final Bundle savedInstanceState) {
142140 + "savedInstanceState = [" + savedInstanceState + "]" );
143141 }
144142
143+ Localization .migrateAppLanguageSettingIfNecessary (getApplicationContext ());
145144 ThemeHelper .setDayNightMode (this );
146145 ThemeHelper .setTheme (this , ServiceHelper .getSelectedServiceId (this ));
147146
@@ -158,7 +157,6 @@ protected void onCreate(final Bundle savedInstanceState) {
158157 }
159158 }
160159
161- assureCorrectAppLanguage (this );
162160 super .onCreate (savedInstanceState );
163161 sharedPreferences = PreferenceManager .getDefaultSharedPreferences (this );
164162 sharedPrefEditor = sharedPreferences .edit ();
@@ -197,7 +195,6 @@ protected void onCreate(final Bundle savedInstanceState) {
197195 UpdateSettingsFragment .askForConsentToUpdateChecks (this );
198196 }
199197
200- Localization .migrateAppLanguageSettingIfNecessary (getApplicationContext ());
201198 SettingMigrations .showUserInfoIfPresent (this );
202199 }
203200
@@ -504,9 +501,8 @@ protected void onDestroy() {
504501
505502 @ Override
506503 protected void onResume () {
507- assureCorrectAppLanguage (this );
508504 // Change the date format to match the selected language on resume
509- Localization .initPrettyTime (Localization .resolvePrettyTime (getApplicationContext () ));
505+ Localization .initPrettyTime (Localization .resolvePrettyTime ());
510506 super .onResume ();
511507
512508 // Close drawer on return, and don't show animation,
0 commit comments