feat(platform): 新增 G122J 平台适配与蓝牙重命名开关

This commit is contained in:
2026-10-14 15:16:36 +08:00
parent b3c0355eb7
commit fa729afb49
7 changed files with 57 additions and 6 deletions

View File

@@ -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"'

BIN
app/keystore/G122J.p12 Normal file

Binary file not shown.

View File

@@ -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";

View File

@@ -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();

View File

@@ -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));

View File

@@ -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) {

View File

@@ -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 {