Added message logging

This commit is contained in:
M66B
2020-04-04 09:19:19 +02:00
parent f7f511c902
commit 257928d4ee

View File

@@ -30,6 +30,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.util.Printer;
import android.webkit.CookieManager;
import androidx.lifecycle.Observer;
@@ -69,6 +70,13 @@ public class ApplicationEx extends Application {
long start = new Date().getTime();
Log.logMemory(this, "App create version=" + BuildConfig.VERSION_NAME);
getMainLooper().setMessageLogging(new Printer() {
@Override
public void println(String msg) {
Log.d("Loop: " + msg);
}
});
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
final boolean crash_reports = prefs.getBoolean("crash_reports", false);