From 86986c8d58ac3db35e36e6fd1c5cb3d997b82929 Mon Sep 17 00:00:00 2001 From: Fanhuitong <981964879@qq.com> Date: Thu, 21 Dec 2023 10:19:22 +0800 Subject: [PATCH] =?UTF-8?q?version:1.2.2=20fix:=20update:=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aospWithoutQuickstep/debug/output.json | 1 - aospWithoutQuickstep/release/output.json | 1 - build.gradle | 9 ++---- src/com/uiuipad/os/base/BaseApplication.java | 31 ++++++++++++++++++++ 4 files changed, 33 insertions(+), 9 deletions(-) delete mode 100644 aospWithoutQuickstep/debug/output.json delete mode 100644 aospWithoutQuickstep/release/output.json diff --git a/aospWithoutQuickstep/debug/output.json b/aospWithoutQuickstep/debug/output.json deleted file mode 100644 index 2d3c890..0000000 --- a/aospWithoutQuickstep/debug/output.json +++ /dev/null @@ -1 +0,0 @@ -[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"Launcher3-Q-aosp-withoutQuickstep-debug.apk","fullName":"aospWithoutQuickstepDebug","baseName":"aosp-withoutQuickstep-debug"},"path":"Launcher3-Q-aosp-withoutQuickstep-debug.apk","properties":{}}] \ No newline at end of file diff --git a/aospWithoutQuickstep/release/output.json b/aospWithoutQuickstep/release/output.json deleted file mode 100644 index 2d347e7..0000000 --- a/aospWithoutQuickstep/release/output.json +++ /dev/null @@ -1 +0,0 @@ -[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":3,"versionName":"1.3","enabled":true,"outputFile":"Launcher3-Q-aosp-withoutQuickstep-release.apk","fullName":"aospWithoutQuickstepRelease","baseName":"aosp-withoutQuickstep-release"},"path":"Launcher3-Q-aosp-withoutQuickstep-release.apk","properties":{}}] \ No newline at end of file diff --git a/build.gradle b/build.gradle index bc59da4..9134dab 100644 --- a/build.gradle +++ b/build.gradle @@ -50,8 +50,8 @@ android { minSdkVersion 26 targetSdkVersion 28 - versionCode 22 - versionName "1.2.1" + versionCode 23 + versionName "1.2.2" ndk { //选择要添加的对应 cpu 类型的 .so 库。 @@ -59,11 +59,6 @@ android { // 还可以添加 'x86', 'x86_64', 'mips', 'mips64' } - manifestPlaceholders = [ - XG_ACCESS_ID : "1500026378", - XG_ACCESS_KEY: "AH5QD9ZMBJ6R", - ] - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true } diff --git a/src/com/uiuipad/os/base/BaseApplication.java b/src/com/uiuipad/os/base/BaseApplication.java index dac6cb3..53a70bc 100644 --- a/src/com/uiuipad/os/base/BaseApplication.java +++ b/src/com/uiuipad/os/base/BaseApplication.java @@ -1,6 +1,8 @@ package com.uiuipad.os.base; import android.app.Application; +import android.os.Handler; +import android.os.Looper; import android.util.Log; import com.tencent.bugly.crashreport.CrashReport; @@ -43,5 +45,34 @@ public class BaseApplication extends Application { CrashReport.initCrashReport(getApplicationContext(), "55d55ba689", false); CrashReport.setDeviceId(this, Utils.getSerial(this)); xcrash.XCrash.init(this); + catchException(); } + + private void catchException() { + Thread.setDefaultUncaughtExceptionHandler( + new Thread.UncaughtExceptionHandler() { + @Override + public void uncaughtException(Thread t, Throwable e) { + Log.e("捕获异常子线程:", Thread.currentThread().getName() + + "在:" + e.getStackTrace()[0].getClassName()); + } + } + ); + //下面是新增方法! + new Handler(Looper.getMainLooper()).post(new Runnable() { + @Override + public void run() { + while (true) { + try { + Looper.loop(); //会先执行这个方法,然后在执行下面的异常捕获方法! + } catch (Exception e) { + Log.e("捕获异常主线程:", Thread.currentThread().getName() + + "在:" + e.getStackTrace()[0].getClassName()); + e.printStackTrace(); + } + } + } + }); + } + }