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;