feat: 集成Bugly崩溃上报并新增计算器禁用功能
- 在BaseApplication中初始化Bugly崩溃上报,设置设备型号和序列号 - 新增计算器应用禁用开关,默认禁止使用 - 调整相机和时钟禁用开关的默认值为禁止 - 升级版本号至1.6.0920(versionCode 211) - build.gradle添加Bugly依赖 Conventional Commits格式的标题应简洁,现改为: feat: 集成Bugly并新增计算器禁用功能
This commit is contained in:
@@ -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'
|
||||
// //阿里云推送
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user