This commit is contained in:
Milos Kozak 2021-02-04 13:19:58 +01:00
parent 411fba5610
commit 136c7fbe6f

View file

@ -3,7 +3,6 @@ package info.nightscout.androidaps;
import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothDevice;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.res.Resources;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.wifi.WifiManager; import android.net.wifi.WifiManager;
@ -42,9 +41,6 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
public class MainApp extends DaggerApplication { public class MainApp extends DaggerApplication {
static MainApp sInstance;
private static Resources sResources;
static DatabaseHelper sDatabaseHelper = null; static DatabaseHelper sDatabaseHelper = null;
@Inject PluginStore pluginStore; @Inject PluginStore pluginStore;
@ -66,10 +62,8 @@ public class MainApp extends DaggerApplication {
super.onCreate(); super.onCreate();
aapsLogger.debug("onCreate"); aapsLogger.debug("onCreate");
sInstance = this;
sResources = getResources();
LocaleHelper.INSTANCE.update(this); LocaleHelper.INSTANCE.update(this);
sDatabaseHelper = OpenHelperManager.getHelper(sInstance, DatabaseHelper.class); sDatabaseHelper = OpenHelperManager.getHelper(this, DatabaseHelper.class);
/* /*
Thread.setDefaultUncaughtExceptionHandler((thread, ex) -> { Thread.setDefaultUncaughtExceptionHandler((thread, ex) -> {
if (ex instanceof InternalError) { if (ex instanceof InternalError) {
@ -121,7 +115,6 @@ public class MainApp extends DaggerApplication {
.build(); .build();
} }
@SuppressWarnings("deprecation")
private void registerLocalBroadcastReceiver() { private void registerLocalBroadcastReceiver() {
IntentFilter filter = new IntentFilter(); IntentFilter filter = new IntentFilter();
filter.addAction(Intents.ACTION_NEW_TREATMENT); filter.addAction(Intents.ACTION_NEW_TREATMENT);