]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/CrashReportingActivity.java
fix method signature
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / CrashReportingActivity.java
index c8edc604ad3ea8ce3683b00aec671fc1d66245f2..24b50fa74db0d3d7a02d39764e346e0195c55cf2 100644 (file)
@@ -1,5 +1,23 @@
+/*
+ * Copyright © 2019 Damyan Ivanov.
+ * This file is part of MoLe.
+ * MoLe is free software: you can distribute it and/or modify it
+ * under the term of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your opinion), any later version.
+ *
+ * MoLe is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License terms for details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with MoLe. If not, see <https://www.gnu.org/licenses/>.
+ */
+
 package net.ktnx.mobileledger.ui.activity;
 
+import android.os.Build;
 import android.os.Bundle;
 import android.util.Log;
 
@@ -11,6 +29,8 @@ import java.io.StringWriter;
 import androidx.annotation.Nullable;
 import androidx.appcompat.app.AppCompatActivity;
 
+import static net.ktnx.mobileledger.utils.Logger.debug;
+
 public abstract class CrashReportingActivity extends AppCompatActivity {
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -21,6 +41,9 @@ public abstract class CrashReportingActivity extends AppCompatActivity {
             public void uncaughtException(Thread t, Throwable e) {
                 StringWriter sw = new StringWriter();
                 PrintWriter pw = new PrintWriter(sw);
+
+                pw.format("OS version: %s; API level %d\n\n", Build.VERSION.RELEASE,
+                        Build.VERSION.SDK_INT);
                 e.printStackTrace(pw);
 
                 Log.e(null, sw.toString());
@@ -30,6 +53,6 @@ public abstract class CrashReportingActivity extends AppCompatActivity {
                 df.show(getSupportFragmentManager(), "crash_report");
             }
         });
-        Log.d("crash", "Uncaught exception handler set");
+        debug("crash", "Uncaught exception handler set");
     }
 }