diff options
Diffstat (limited to 'main/src/ui/java/de/blinkt')
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/activities/BaseActivity.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/BaseActivity.java b/main/src/ui/java/de/blinkt/openvpn/activities/BaseActivity.java index 0e143042..cca8b155 100644 --- a/main/src/ui/java/de/blinkt/openvpn/activities/BaseActivity.java +++ b/main/src/ui/java/de/blinkt/openvpn/activities/BaseActivity.java @@ -6,12 +6,16 @@ package de.blinkt.openvpn.activities; import android.app.UiModeManager; +import android.content.Context; import android.content.res.Configuration; import android.os.Bundle; import android.view.Window; +import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; +import de.blinkt.openvpn.core.LocaleHelper; + public abstract class BaseActivity extends AppCompatActivity { boolean isAndroidTV() { final UiModeManager uiModeManager = (UiModeManager) getSystemService(UI_MODE_SERVICE); @@ -29,12 +33,13 @@ public abstract class BaseActivity extends AppCompatActivity { } @Override - protected void onResume() { - super.onResume(); + protected void attachBaseContext(Context base) { + super.attachBaseContext(LocaleHelper.updateResources(base)); } @Override - protected void onPause() { - super.onPause(); + public void onConfigurationChanged(@NonNull Configuration newConfig) { + super.onConfigurationChanged(newConfig); + LocaleHelper.onConfigurationChange(this); } } |