From 136c7fbe6ff854cc1b160ad83c5c876fe5133d19 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 4 Feb 2021 13:19:58 +0100 Subject: [PATCH] cleanup --- .../main/java/info/nightscout/androidaps/MainApp.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index ca60ca93d4..d03fd25c8f 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -3,7 +3,6 @@ package info.nightscout.androidaps; import android.bluetooth.BluetoothDevice; import android.content.Intent; import android.content.IntentFilter; -import android.content.res.Resources; import android.net.ConnectivityManager; import android.net.wifi.WifiManager; @@ -42,9 +41,6 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP; public class MainApp extends DaggerApplication { - static MainApp sInstance; - private static Resources sResources; - static DatabaseHelper sDatabaseHelper = null; @Inject PluginStore pluginStore; @@ -66,10 +62,8 @@ public class MainApp extends DaggerApplication { super.onCreate(); aapsLogger.debug("onCreate"); - sInstance = this; - sResources = getResources(); LocaleHelper.INSTANCE.update(this); - sDatabaseHelper = OpenHelperManager.getHelper(sInstance, DatabaseHelper.class); + sDatabaseHelper = OpenHelperManager.getHelper(this, DatabaseHelper.class); /* Thread.setDefaultUncaughtExceptionHandler((thread, ex) -> { if (ex instanceof InternalError) { @@ -121,7 +115,6 @@ public class MainApp extends DaggerApplication { .build(); } - @SuppressWarnings("deprecation") private void registerLocalBroadcastReceiver() { IntentFilter filter = new IntentFilter(); filter.addAction(Intents.ACTION_NEW_TREATMENT);