diff --git a/app/build.gradle b/app/build.gradle index 1fee744..efbac19 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,8 +29,8 @@ android { defaultConfig { applicationId "com.aoleyun.sn" - versionCode 197 - versionName "1.5.1018" + versionCode 200 + versionName "1.5.1216" //There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature. minSdkVersion 24 @@ -67,6 +67,12 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } + externalNativeBuild { + cmake { + path file('CMakeLists.txt') + } + } + sourceSets { //测试版的图标 // beta.res.srcDirs = ['src/beta/res'] @@ -648,11 +654,6 @@ android { } } - externalNativeBuild { - cmake { - path file('CMakeLists.txt') - } - } } dependencies { diff --git a/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java b/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java index da85611..7e409f4 100644 --- a/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java +++ b/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java @@ -249,6 +249,8 @@ public class MainActivity extends BaseMvvmActivity> baseResponse) { Log.e("getAppIDControl", "onNext: " + baseResponse); - Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, "com.ttstd.utils:12345"); + // TODO: 2025/11/21 高木g104不需要id管控 + if ("G104".equals(Build.MODEL)) { + try { + Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, null); + CmdUtil.Result result = CmdUtil.execute(" settings delete system app_view_click_disabled"); + Log.e(TAG, "getAppIDControl: " + result); + } catch (Exception e) { + e.printStackTrace(); + } + } else { + Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, "com.arivoc.wordhd:2131624676,2131624689;com.ttstd.utils:12345"); + } if (baseResponse.code == OK) { List appIDList = baseResponse.data; cacheHelper.put(UrlAddress.GET_APPID, GsonUtils.toJSONString(appIDList)); -// JgyUtils.getInstance().writeDeselectIDtoSystem(appIDList); + JgyUtils.getInstance().writeDeselectIDtoSystem(appIDList); } else { cacheHelper.put(UrlAddress.GET_APPID, ""); -// JgyUtils.getInstance().writeDeselectIDtoSystem(null); + JgyUtils.getInstance().writeDeselectIDtoSystem(null); } } diff --git a/app/src/main/java/com/aoleyun/sn/service/main/MainService.java b/app/src/main/java/com/aoleyun/sn/service/main/MainService.java index 18a9fab..8003374 100644 --- a/app/src/main/java/com/aoleyun/sn/service/main/MainService.java +++ b/app/src/main/java/com/aoleyun/sn/service/main/MainService.java @@ -492,7 +492,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo TimeTask task = new TimeTask(); task.execute("ntp.aliyun.com"); - boolean reboot = mMMKV.decodeBool(CommonConfig.DEVICES_REBOOT, false); + boolean reboot = mMMKV.decodeBool(CommonConfig.DEVICES_REBOOT, true); if (reboot) { mPresenter.getLockedState(); mMMKV.encode(CommonConfig.DEVICES_REBOOT, false); @@ -655,18 +655,15 @@ public class MainService extends Service implements MainSContact.MainView, Netwo } private static final String CHANNEL_ID = "CHANNEL_ID"; - private static final String channel_name = "系统通知"; - private static final String channel_description = "我的设备系统通知"; + private static final String CHANNEL_NAME = "系统通知"; + private static final String CHANNEL_DESCRIPTION = "我的设备系统通知"; private void createNotificationChannel() { // Create the NotificationChannel, but only on API 26+ because // the NotificationChannel class is new and not in the support library if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - CharSequence name = channel_name; - String description = channel_description; - int importance = NotificationManager.IMPORTANCE_DEFAULT; - NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance); - channel.setDescription(description); + NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT); + channel.setDescription(CHANNEL_DESCRIPTION); // Register the channel with the system; you can't change the importance // or other notification behaviors after this NotificationManager notificationManager = getSystemService(NotificationManager.class); @@ -678,7 +675,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo private int NotificationID = 1; private void sendSimpleNotification() { - NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "CHANNEL_ID") + NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle("设备管控中") // .setContentText("测试内容") diff --git a/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java b/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java index 067fc67..179da0f 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java @@ -836,6 +836,10 @@ public class JgyUtils { this.add(BuildConfig.APPLICATION_ID); this.add("com.aoleyun.appstore"); this.add("com.aoleyun.camera"); + this.add("com.aoleyun.browser"); + this.add("com.aoleyun.info"); + this.add("com.aoleyun.os"); + this.add("com.aoleyun.calculator"); this.add("com.aoleyun.gallery3d"); this.addAll(ApkUtils.mJxwApp); @@ -1011,6 +1015,10 @@ public class JgyUtils { } public void writeDeselectIDtoSystem(List appIDList) { + if (!"Ebox201".equals(Build.MODEL)&&!"Ebox201W".equals(Build.MODEL)){ + Log.e(TAG, "writeDeselectIDtoSystem: not match Ebox201 or Ebox201W" ); + return; + } if (appIDList == null || appIDList.isEmpty()) { try { Settings.System.putString(crv, CommonConfig.APP_VIEW_CLICK_DISABLED, null); diff --git a/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java b/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java index 0ffde6e..7094ff0 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java @@ -83,7 +83,7 @@ public class SysSettingUtils { Toaster.debugShow("关闭所有功能"); Log.e("setDisableSetting", "Close all settings: "); setPhoneList(context, 1); - setUsbStatus(context, 1); + setUsbStatus(context, 0); if (JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.YXPD1TAG) || JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.C2Tag) || JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.ZR6016Tag) @@ -95,7 +95,7 @@ public class SysSettingUtils { setHotspot(context, 1); setBar(context, 1); setCamera(context, 1); - setTF(context, 1); + setTF(context, 0); setIcon(context, 0); setWallpaper(context, 0); setCanReset(context, 0); diff --git a/获取SN.docx b/获取SN.docx new file mode 100644 index 0000000..d1a7a9c Binary files /dev/null and b/获取SN.docx differ