From 39f72f9058f9d4ce935a97411002eea467ad8b27 Mon Sep 17 00:00:00 2001 From: gdlbo <41114720+gdlbo@users.noreply.github.com> Date: Tue, 10 May 2022 14:35:33 +0300 Subject: [PATCH] Crashreporter fix --- .../main/java/ru/vtosters/lite/f0x1d/Crashreporter.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/ru/vtosters/lite/f0x1d/Crashreporter.java b/app/src/main/java/ru/vtosters/lite/f0x1d/Crashreporter.java index 4c84b1753..09f968ce2 100644 --- a/app/src/main/java/ru/vtosters/lite/f0x1d/Crashreporter.java +++ b/app/src/main/java/ru/vtosters/lite/f0x1d/Crashreporter.java @@ -1,8 +1,7 @@ package ru.vtosters.lite.f0x1d; -import static ru.vtosters.lite.utils.About.*; -import static ru.vtosters.lite.utils.Globals.*; -import static ru.vtosters.lite.utils.Preferences.*; +import static ru.vtosters.lite.utils.About.getBuildNumber; +import static ru.vtosters.lite.utils.Globals.getContext; import android.app.Activity; import android.app.Notification; @@ -37,7 +36,7 @@ public class Crashreporter { } static void start(Thread.UncaughtExceptionHandler uncaughtExceptionHandler, Thread thread, Throwable th, Activity activity) { - logString = getStackTrace(th) + "\n\n" + new DeviceInfoCollector().collect(getContext()).toDeviceName() + "\n VTL Version: " + VERSIONNAME + ", build: " + getBuildNumber(); + logString = getStackTrace(th) + "\n\n" + new DeviceInfoCollector().collect(getContext()).toDeviceName() + ", commit: " + getBuildNumber(); if (Build.VERSION.SDK_INT >= 26) { var notificationChannel = new NotificationChannel("crashes", "crash", NotificationManager.IMPORTANCE_DEFAULT); notificationChannel.enableVibration(true); @@ -61,7 +60,7 @@ public class Crashreporter { var builder = new Notification.Builder(getContext()); builder.setSmallIcon(R.drawable.ic_bug_24); - builder.setContentTitle("VTL Крашнулся!"); + builder.setContentTitle("Произошла ошибка в работе VTLite!"); builder.setContentText(logString); builder.setStyle(new Notification.BigTextStyle().bigText(logString)); builder.setAutoCancel(true);