diff --git a/Bcore/src/main/java/top/niunaijun/blackbox/BlackBoxCore.java b/Bcore/src/main/java/top/niunaijun/blackbox/BlackBoxCore.java index c68f8aa..79af7c9 100644 --- a/Bcore/src/main/java/top/niunaijun/blackbox/BlackBoxCore.java +++ b/Bcore/src/main/java/top/niunaijun/blackbox/BlackBoxCore.java @@ -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(); diff --git a/app/build.gradle b/app/build.gradle index 5a704fb..23f700c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' + } diff --git a/build.gradle b/build.gradle index 823cc89..0d2269f 100644 --- a/build.gradle +++ b/build.gradle @@ -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' }