From 4eb0d65e8adfee0661ca57341609cfa6415058a0 Mon Sep 17 00:00:00 2001 From: tongtongstudio Date: Wed, 23 Sep 2026 15:26:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=9B=86=E6=88=90Bugly=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=E4=B8=8A=E6=8A=A5=E5=B9=B6=E6=96=B0=E5=A2=9E=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=99=A8=E7=A6=81=E7=94=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在BaseApplication中初始化Bugly崩溃上报,设置设备型号和序列号 - 新增计算器应用禁用开关,默认禁止使用 - 调整相机和时钟禁用开关的默认值为禁止 - 升级版本号至1.6.0920(versionCode 211) - build.gradle添加Bugly依赖 Conventional Commits格式的标题应简洁,现改为: feat: 集成Bugly并新增计算器禁用功能 --- build.gradle | 6 ++++-- src/com/aoleyun/os/Launcher.java | 1 + src/com/aoleyun/os/base/BaseApplication.java | 7 +++++++ src/com/aoleyun/os/touch/ItemClickHandler.java | 11 +++++++++-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index b18fe79..38bd792 100644 --- a/build.gradle +++ b/build.gradle @@ -75,8 +75,8 @@ android { minSdkVersion 26 targetSdkVersion 28 - versionCode 209 - versionName "1.6.0914" + versionCode 211 + versionName "1.6.0920" ndk { //选择要添加的对应 cpu 类型的 .so 库。 @@ -754,6 +754,8 @@ dependencies { implementation 'com.jakewharton:disklrucache:2.0.2' //mmkv implementation 'com.tencent:mmkv-static:2.4.0' + //bugly + implementation 'com.tencent.bugly:crashreport:4.1.9.2' // //腾讯移动推送 TPNS // implementation 'com.tencent.tpns:tpns:1.3.2.0-release' // //阿里云推送 diff --git a/src/com/aoleyun/os/Launcher.java b/src/com/aoleyun/os/Launcher.java index e47439f..09579b8 100644 --- a/src/com/aoleyun/os/Launcher.java +++ b/src/com/aoleyun/os/Launcher.java @@ -155,6 +155,7 @@ import com.aoleyun.os.widget.custom.CustomWidgetParser; import com.arialyy.aria.core.Aria; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; +import com.tencent.bugly.crashreport.CrashReport; import com.tencent.mmkv.MMKV; import java.io.File; diff --git a/src/com/aoleyun/os/base/BaseApplication.java b/src/com/aoleyun/os/base/BaseApplication.java index 98ca544..23b2694 100644 --- a/src/com/aoleyun/os/base/BaseApplication.java +++ b/src/com/aoleyun/os/base/BaseApplication.java @@ -1,14 +1,17 @@ package com.aoleyun.os.base; import android.app.Application; +import android.os.Build; import android.util.Log; import com.aoleyun.os.manager.ConnectManager; import com.aoleyun.os.network.NetInterfaceManager; import com.aoleyun.os.uiuiutils.JgyUtils; import com.aoleyun.os.uiuiutils.TimeUtils; +import com.aoleyun.os.uiuiutils.Utils; import com.arialyy.aria.core.Aria; import com.hjq.toast.Toaster; +import com.tencent.bugly.crashreport.CrashReport; import com.tencent.mmkv.MMKV; public class BaseApplication extends Application { @@ -20,6 +23,10 @@ public class BaseApplication extends Application { String rootDir = MMKV.initialize(this); Log.e(TAG, "onCreate: " + rootDir); + CrashReport.initCrashReport(getApplicationContext(), "6c94f946fe", false); + CrashReport.setDeviceModel(this, Build.MODEL); + CrashReport.setDeviceId(this, Utils.getSerial(this)); + JgyUtils.init(this); TimeUtils.init(this); Aria.init(this); diff --git a/src/com/aoleyun/os/touch/ItemClickHandler.java b/src/com/aoleyun/os/touch/ItemClickHandler.java index b1337d3..dd1500c 100644 --- a/src/com/aoleyun/os/touch/ItemClickHandler.java +++ b/src/com/aoleyun/os/touch/ItemClickHandler.java @@ -191,7 +191,7 @@ public class ItemClickHandler { switch (pkg) { case "com.mediatek.camera": case "com.android.camera2": - if (Settings.System.getInt(context.getContentResolver(), "qch_app_camera", 0) == 1) { + if (Settings.System.getInt(context.getContentResolver(), "qch_app_camera", 1) == 1) { Toaster.show("摄像头已禁止使用"); return true; } @@ -209,7 +209,7 @@ public class ItemClickHandler { } break; case "com.android.deskclock": - if (Settings.System.getInt(context.getContentResolver(), "qch_app_deskclock", 0) == 1) { + if (Settings.System.getInt(context.getContentResolver(), "qch_app_deskclock", 1) == 1) { Toaster.show("时钟已禁止使用"); return true; } @@ -239,6 +239,13 @@ public class ItemClickHandler { return true; } break; + case "com.android.calculator": + case "com.android.calculator2": + if (Settings.System.getInt(context.getContentResolver(), "aole_app_calculator", 1) == 1) { + Toaster.show("计算器已禁止使用"); + return true; + } + break; default: } return false;