refactor: Refine crash log reporting details, update application ID, and add WorkManager dependency.

This commit is contained in:
ArtRuntime
2026-02-04 18:56:26 +05:30
parent 5288031742
commit d5b68fef42
3 changed files with 14 additions and 11 deletions
@@ -2186,15 +2186,14 @@ public class BlackBoxCore extends ClientConfiguration {
// Create temp file
File cacheDir = getContext().getCacheDir();
File tempLog = File.createTempFile("crash_log_", ".txt", cacheDir);
// Construct full caption
String baseCaption = caption != null ? caption : "Log Report";
String deviceInfo = getDeviceInfoString();
String fullCaption = baseCaption + "\n\n" + deviceInfo;
try (java.io.FileOutputStream fos = new java.io.FileOutputStream(tempLog)) {
// Write Header
String header = "Caption: " + baseCaption + "\n\n" + deviceInfo + "\n\n--- LOGCAT ---\n";
String header = "Caption: " + "\n\n" + deviceInfo + "\n\n--- LOGCAT ---\n";
fos.write(header.getBytes("UTF-8"));
// Dump Logcat
@@ -2210,7 +2209,7 @@ public class BlackBoxCore extends ClientConfiguration {
}
// Send
String error = LogSender.send(chatId, tempLog, fullCaption);
String error = LogSender.send(chatId, tempLog, deviceInfo);
if (error != null) {
Slog.e(TAG, "Log upload failed: " + error);
// Show Toast on Main Thread
@@ -2291,9 +2290,9 @@ public class BlackBoxCore extends ClientConfiguration {
sb.append("64-bit ABIs: ").append(String.join(", ", Build.SUPPORTED_64_BIT_ABIS)).append("\n");
}
// Build Fingerprint
sb.append("Fingerprint: ").append(Build.FINGERPRINT).append("\n");
// // Build Fingerprint
// sb.append("Fingerprint: ").append(Build.FINGERPRINT).append("\n");
//
// Memory Info
try {
Runtime runtime = Runtime.getRuntime();
+5 -1
View File
@@ -9,7 +9,7 @@ android {
compileSdk rootProject.ext.compileSdkVersion
ndkVersion = "29.0.13846066"
defaultConfig {
applicationId "top.niunaijun.blackboxa"
applicationId "top.niunaijun.blackbox"
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
@@ -91,4 +91,8 @@ dependencies {
// WorkManager
implementation 'androidx.work:work-runtime:2.7.1'
}
+1 -1
View File
@@ -11,7 +11,7 @@ ext {
// targetSdkVersion = 35
minSdk = 21
versionCode = 311
versionName = "3.1.2-beta"
versionName = "3.1.3-beta"
xVersion = '1.1.0'
hiddenApiBypass = '4.3'
}