Android: robustness if locale failed to be detected at start
authorSylvain Becker <sylvain.becker@gmail.com>
Fri, 08 May 2020 21:50:23 +0200
changeset 138014298bf108b06
parent 13800 1e7e8c85a056
child 13803 a73b49512ba2
Android: robustness if locale failed to be detected at start
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Fri May 08 21:40:28 2020 +0200
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Fri May 08 21:50:23 2020 +0200
     1.3 @@ -423,7 +423,7 @@
     1.4          Log.v(TAG, "onConfigurationChanged()");
     1.5          super.onConfigurationChanged(newConfig);
     1.6  
     1.7 -        if (!mCurrentLocale.equals(newConfig.locale)) {
     1.8 +        if (mCurrentLocale == null || !mCurrentLocale.equals(newConfig.locale)) {
     1.9              mCurrentLocale = newConfig.locale;
    1.10              SDLActivity.onNativeLocaleChanged();
    1.11          }