|
|
|
@ -32,6 +32,7 @@ import android.os.Looper;
|
|
|
|
|
import android.util.Printer;
|
|
|
|
|
import android.webkit.CookieManager;
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.preference.PreferenceManager;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
@ -39,7 +40,8 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.Locale;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
public class ApplicationEx extends Application implements SharedPreferences.OnSharedPreferenceChangeListener {
|
|
|
|
|
public class ApplicationEx extends Application
|
|
|
|
|
implements androidx.work.Configuration.Provider, SharedPreferences.OnSharedPreferenceChangeListener {
|
|
|
|
|
private Thread.UncaughtExceptionHandler prev = null;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -132,6 +134,7 @@ public class ApplicationEx extends Application implements SharedPreferences.OnSh
|
|
|
|
|
CookieManager.getInstance().setAcceptCookie(false);
|
|
|
|
|
|
|
|
|
|
MessageHelper.setSystemProperties(this);
|
|
|
|
|
|
|
|
|
|
ContactInfo.init(this);
|
|
|
|
|
|
|
|
|
|
DisconnectBlacklist.init(this);
|
|
|
|
@ -161,6 +164,15 @@ public class ApplicationEx extends Application implements SharedPreferences.OnSh
|
|
|
|
|
Log.i("App created " + (end - start) + " ms");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@NonNull
|
|
|
|
|
@Override
|
|
|
|
|
public androidx.work.Configuration getWorkManagerConfiguration() {
|
|
|
|
|
// https://developer.android.com/topic/libraries/architecture/workmanager/advanced/custom-configuration
|
|
|
|
|
return new androidx.work.Configuration.Builder()
|
|
|
|
|
.setMinimumLoggingLevel(android.util.Log.INFO)
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
|
|
|
|
switch (key) {
|
|
|
|
|