From fa729afb49dbf05fc61210a47fef7853416d5e47 Mon Sep 17 00:00:00 2001 From: tongtongstudio Date: Wed, 14 Oct 2026 15:16:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(platform):=20=E6=96=B0=E5=A2=9E=20G122J=20?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E9=80=82=E9=85=8D=E4=B8=8E=E8=93=9D=E7=89=99?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 28 ++++++++++++++++-- app/keystore/G122J.p12 | Bin 0 -> 2648 bytes .../com/aoleyun/sn/comm/CommonConfig.java | 2 ++ .../aoleyun/sn/service/main/MainService.java | 9 ++++-- .../java/com/aoleyun/sn/utils/JgyUtils.java | 17 ++++++++++- .../com/aoleyun/sn/utils/SysSettingUtils.java | 6 ++++ .../main/java/com/aoleyun/sn/utils/Utils.java | 1 + 7 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 app/keystore/G122J.p12 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 0000000000000000000000000000000000000000..6ece76dae00f76e70b0f5037255986bda7f00550 GIT binary patch literal 2648 zcmY+^cQhM{9tZFwB8ZimwY9XUl~4^@t0)!J9yLoTwKr|8SiOi<IjxPIbEqWg=E3zI&|puQem+tkB?6P zsL>53n&Ho1oT#~l%Ge-k>^X* z101jEeKq~8TFrKRU7zN)|M;_iv=kxS)6>>ekCSrWT-ZE6Ib2k$!Uq>i?J};;bx~~Q zCd<4#?8p5co)l*lB+hAh|M{#y_{^!HR}$!j4hjEYW~1$LT0`L%!}euAgICQR((D62 z{al6g4E&pC5>f!%ZGe?dk4l-A=~5V0i2dO5yzC+2k#z5g?F`#C~&pOOoQ!sYgqeYEyeduRWr1gcqcFkrS`^wq>c8` zaZQFW6uK{!CtO3pnEI3}(?eTy@)xc8*PA*R00pxzBNliM3^ty;d zGMX)=%;KRk|FF;V@+(T#^Wy3UsYi~rdr@nFKc^9>H0h_w8{Jf3nJ3~sBhKJ`9Ms8h zSC0D3jd<76QlPYRo+e{s?E5>q5r{ z+Z@%*Uqj+}m+Wb)GM%Q9N3wT}2+YJt+g&qv}hv z=??w+1x%z9Ra#!6_eijKda7?DM$qEcc~75w*cJ25wYlcoz8mkY zXarUvKb_W<$1M7(5q7g7E~y{XPFthoQNcFipE5edz1$*i+aE=53LQS$SE<}h_0NFC`C#!gnD=*?*Lhe(GM_ypmbnkz}t@IB;j_yf%&^dM0dSJjmHF??^j2+ z6D`y(+)u9&8i+VBViWc|oOQ`(U5w3~O?TcIaQH%?3KzoM^1NG9SU%@W&)B-srk^5p z5|a*eA4?DArjaM|5w7iJ)a}5+2pi8o=oQ4`l%N9Fg(KqK5-F|E`bMp0hmmf=>&TJe zZXrggdx^IbSA~F0?%t9WU1L$5J}$j-%DM}>)hWRo%5&Bo+2kA7c#JyS=6s*5y!JqC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h%%j|2*p?q}tn4xbZ4kxhCBGvu0N@Dt1vm?Y uQI>-NB*+K=^Gx<~c#nby6t^O{4IGMPLjjH}{$OT9%6@Za@}~0Nfc^`)IqDYx literal 0 HcmV?d00001 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 {