diff --git a/app/build.gradle b/app/build.gradle index f34ffe7..ea6b62e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,8 +18,8 @@ android { defaultConfig { applicationId "com.aoleyun.sn" - versionCode 245 - versionName "1.6.1010" + versionCode 246 + versionName "1.6.1013" //There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature. minSdkVersion 24 @@ -313,9 +313,33 @@ android { v1SigningEnabled true v2SigningEnabled true } + + G122J { + storeFile file("keystore/G122J.p12") + storePassword "123456" + keyAlias "g122j" + keyPassword "123456" + v1SigningEnabled true + v2SigningEnabled true + } } buildTypes { + + G122JDebug.initWith(debug) + G122JDebug { + buildConfigField "String", "platform", '"G122J"' + versionNameSuffix "_debug" + debuggable true + signingConfig signingConfigs.G122J + } + + G122JRelease.initWith(release) + G122JRelease { + buildConfigField "String", "platform", '"G122J"' + signingConfig signingConfigs.G122J + } + G12NLDebug.initWith(debug) G12NLDebug { buildConfigField "String", "platform", '"G12NL"' diff --git a/app/keystore/G122J.p12 b/app/keystore/G122J.p12 new file mode 100644 index 0000000..6ece76d Binary files /dev/null and b/app/keystore/G122J.p12 differ diff --git a/app/src/main/java/com/aoleyun/sn/comm/CommonConfig.java b/app/src/main/java/com/aoleyun/sn/comm/CommonConfig.java index 2c0586e..0707c88 100644 --- a/app/src/main/java/com/aoleyun/sn/comm/CommonConfig.java +++ b/app/src/main/java/com/aoleyun/sn/comm/CommonConfig.java @@ -178,6 +178,8 @@ public class CommonConfig { public final static String AOLE_BT_COMPUTER_KEY = "aole_bt_computer_on"; /*鼠标键盘*/ public final static String AOLE_BT_KEYBOARD_KEY = "aole_bt_keyboard_on"; + /*蓝牙重命名开关*/ + public final static String AOLE_ACTION_BT_RENAME_ALLOW = "aole_bt_rename_allow"; /*电话白名单开关*/ public final static String AOLE_ACTION_WHITE_LIST_ON = "aole_white_list_on"; 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 8112a37..d6942bb 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 @@ -455,9 +455,12 @@ public class MainService extends BaseService implements NetworkUtils.OnNetworkSt setStatusbar(); setFloatingWindow(); JgyUtils.getInstance().writeAppPackageList(); -// mNotificationManagerCompat = NotificationManagerCompat.from(this); -// createNotificationChannel(); -// sendSimpleNotification(); + + if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.HL500Platform) { + mNotificationManagerCompat = NotificationManagerCompat.from(this); + createNotificationChannel(); + sendSimpleNotification(); + } // aliyunPushInit(); 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 561fa37..bc4cc8b 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java @@ -179,6 +179,7 @@ public class JgyUtils { public static final int QualcommPlatform = 30; public static final int DX11Platform = 31; public static final int G12NLPlatform = 32; + public static final int G122JPlatform = 34; public static final String Other = "其他"; @@ -207,6 +208,7 @@ public class JgyUtils { public static final String Qualcomm_TAG = "QualcommA"; public static final String DX11_TAG = "DX11"; public static final String G12NL_TAG = "G12NL"; + public static final String G122J_TAG = "G122J"; private CacheHelper cacheHelper; @@ -372,6 +374,9 @@ public class JgyUtils { } else if (DX11_TAG.equalsIgnoreCase(platform)) { Log.i(TAG, "checkAppPlatform: " + "DX11"); return DX11Platform; + } else if (G122J_TAG.equalsIgnoreCase(platform)) { + Log.i(TAG, "checkAppPlatform: " + "G122J"); + return G122JPlatform; } else { Log.i(TAG, "checkAppPlatform: " + "没有数据"); return UnknowPlatform; @@ -444,6 +449,8 @@ public class JgyUtils { getAppPlatformCallback.AppPlatform(G12NLPlatform); } else if (DX11_TAG.equalsIgnoreCase(platform)) { getAppPlatformCallback.AppPlatform(DX11Platform); + } else if (G122J_TAG.equalsIgnoreCase(platform)) { + getAppPlatformCallback.AppPlatform(G122JPlatform); } else { getAppPlatformCallback.AppPlatform(UnknowPlatform); } @@ -2676,7 +2683,15 @@ public class JgyUtils { Log.e(TAG, "startServices: " + "lastTime: " + lastTime); } else { lastTime = System.currentTimeMillis(); - context.startService(new Intent(context, MainService.class)); + if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.HL500Platform) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + context.startForegroundService(new Intent(context, MainService.class)); + } else { + context.startService(new Intent(context, MainService.class)); + } + } else { + context.startService(new Intent(context, MainService.class)); + } context.startService(new Intent(context, StepService.class)); context.startService(new Intent(context, GuardService.class)); // context.startService(new Intent(context, LogcatService.class)); 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 6c761eb..d76a931 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java @@ -393,6 +393,8 @@ public class SysSettingUtils { if (JgyUtils.isAllWinnerDevice()) { AllwinnerCubeMdmManager.getInstance().setBluetoothEnable(state == 0); } + // TODO: 2026/10/14 默认不管控 + Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_BT_RENAME_ALLOW, 1); } /** @@ -498,6 +500,10 @@ public class SysSettingUtils { if (JgyUtils.isAllWinnerDevice()) { AllwinnerCubeMdmManager.getInstance().setBluetoothEnable(setting_bht == 0); } + + int bt_rename = changeNum(jsonObject.get("bluetooth_name_change").getAsInt()); + Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_BT_RENAME_ALLOW, bt_rename); + } public static int getBluetooth(Context context) { diff --git a/app/src/main/java/com/aoleyun/sn/utils/Utils.java b/app/src/main/java/com/aoleyun/sn/utils/Utils.java index d32e528..34aa8d0 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/Utils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/Utils.java @@ -1848,6 +1848,7 @@ public class Utils { || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.QualcommPlatform || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G12NLPlatform + || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G122JPlatform ) { return Utils.getProperty("ro.build.display.id", "获取失败"); } else {