<NME> CgeoApplication.java
<BEF> package cgeo.geocaching;

import cgeo.geocaching.network.Cookies;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.storage.DataStore;
import cgeo.geocaching.ui.notifications.NotificationChannels;
import cgeo.geocaching.utils.ContextLogger;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.OOMDumpingUncaughtExceptionHandler;

import android.app.Application;
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.Looper;
import android.os.UserManager;

import androidx.annotation.NonNull;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

import java.util.concurrent.atomic.AtomicInteger;

public class CgeoApplication extends Application {

    private static CgeoApplication instance;
    private static final AtomicInteger lowPrioNotificationCounter = new AtomicInteger(0);
    private static final AtomicBoolean hasHighPrioNotification = new AtomicBoolean(false);

    public CgeoApplication() {
        setInstance(this);
    }

    private static void setInstance(@NonNull final CgeoApplication application) {
        instance = application;
    }

    public static Application getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        Log.iForce("---------------- CGeoApplication: startup -------------");
            fixUserManagerMemoryLeak();
        }

        showOverflowMenu();

        initApplicationLocale();
                fixUserManagerMemoryLeak();
            }

            showOverflowMenu();

            initApplicationLocale();

            // initialize cgeo notification channels
            NotificationChannels.createNotificationChannels(this);

            // ensure initialization of lists
            DataStore.getLists();

            // Restore cookies
            Cookies.restoreCookies();

            LooperLogger.startLogging(Looper.getMainLooper());
        }
    }

    /**
     * https://code.google.com/p/android/issues/detail?id=173789
        }
    }

    @Override
    public void onConfigurationChanged(final Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException ignored) {
        }
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        onTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE);
    }

    @SuppressLint("NewApi")
    @Override
    public void onTrimMemory(final int level) {
        super.onTrimMemory(level);
        if (level >= TRIM_MEMORY_MODERATE) {
            Log.i("Cleaning applications cache to trim memory");
            DataStore.removeAllFromCache();
        }
    }

    /**
     * Enforce a specific language if the user decided so.
     */
    private void initApplicationLocale() {
        final Configuration config = getResources().getConfiguration();
        config.locale = Settings.getApplicationLocale();
        final Resources resources = getResources();
        resources.updateConfiguration(config, resources.getDisplayMetrics());
    }

    public AtomicInteger getLowPrioNotificationCounter() {
        return lowPrioNotificationCounter;
    }

    public AtomicBoolean getHasHighPrioNotification() {
        return hasHighPrioNotification;
    }

}

<MSG> workaround for google maps corrupted zoom data file bug (#8244)

* workaround for google maps corrupted zoom data file bug

* updated workaround according to latest recommendations
<DFF> @@ -11,6 +11,7 @@ import android.annotation.TargetApi;
 import android.app.Application;
 import android.content.ComponentCallbacks2;
 import android.content.Context;
+import android.content.SharedPreferences;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.os.Build;
@@ -19,6 +20,7 @@ import android.view.ViewConfiguration;
 
 import androidx.annotation.NonNull;
 
+import java.io.File;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
@@ -48,6 +50,8 @@ public class CgeoApplication extends Application {
             fixUserManagerMemoryLeak();
         }
 
+        fixGoogleMapZoomDataBug();
+
         showOverflowMenu();
 
         initApplicationLocale();
@@ -76,6 +80,28 @@ public class CgeoApplication extends Application {
         }
     }
 
+    /**
+     * https://issuetracker.google.com/issues/154855417
+     * delete corrupted map zoom data files once
+     * bug appeared 2020-04-22
+     * workaround according to https://issuetracker.google.com/issues/154855417#comment398
+     */
+    private void fixGoogleMapZoomDataBug() {
+        try {
+            final SharedPreferences hasFixedGoogleBug154855417 = getSharedPreferences("google_bug_154855417", Context.MODE_PRIVATE);
+            if (!hasFixedGoogleBug154855417.contains("fixed")) {
+                final File corruptedZoomTables = new File(getFilesDir(), "ZoomTables.data");
+                final File corruptedSavedClientParameters = new File(getFilesDir(), "SavedClientParameters.data.cs");
+                final File corruptedClientParametersData = new File(getFilesDir(), "DATA_ServerControlledParametersManager.data.v1." + getBaseContext().getPackageName());
+                corruptedZoomTables.delete();
+                corruptedSavedClientParameters.delete();
+                corruptedClientParametersData.delete();
+                hasFixedGoogleBug154855417.edit().putBoolean("fixed", true).apply();
+            }
+        } catch (Exception e) {
+        }
+    }
+
     @Override
     public void onConfigurationChanged(final Configuration newConfig) {
         super.onConfigurationChanged(newConfig);

workaround for google maps corrupted zoom data file bug (#8244)