1 Commits

Author SHA1 Message Date
2029f7020f version:1.6.0317
bugfixes:修复网络黑白名单报错
add:增加设置菜单管控,增加中性桌面包名
2026-03-18 11:55:44 +08:00
8 changed files with 108 additions and 83 deletions

View File

@@ -29,8 +29,8 @@ android {
defaultConfig { defaultConfig {
applicationId "com.aoleyun.sn" applicationId "com.aoleyun.sn"
versionCode 206 versionCode 208
versionName "1.6.0226" versionName "1.6.0317"
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature. //There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
minSdkVersion 24 minSdkVersion 24

View File

@@ -2019,7 +2019,7 @@ public class NetInterfaceManager {
public void onNext(@NonNull BaseResponse<List<AppID>> baseResponse) { public void onNext(@NonNull BaseResponse<List<AppID>> baseResponse) {
Log.e("getAppIDControl", "onNext: " + baseResponse); Log.e("getAppIDControl", "onNext: " + baseResponse);
// TODO: 2025/11/21 高木g104不需要id管控 // TODO: 2025/11/21 高木g104不需要id管控
if ("G104".equals(Build.MODEL)) { if ("G104".equals(Build.MODEL) || "HT01".equals(Build.MODEL)) {
try { try {
Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, null); Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, null);
CmdUtil.Result result = CmdUtil.execute(" settings delete system app_view_click_disabled"); CmdUtil.Result result = CmdUtil.execute(" settings delete system app_view_click_disabled");

View File

@@ -97,7 +97,6 @@ import static android.os.BatteryManager.EXTRA_TECHNOLOGY;
import static android.os.BatteryManager.EXTRA_TEMPERATURE; import static android.os.BatteryManager.EXTRA_TEMPERATURE;
import static android.os.BatteryManager.EXTRA_VOLTAGE; import static android.os.BatteryManager.EXTRA_VOLTAGE;
/** /**
* 守护进程 双进程通讯 * 守护进程 双进程通讯
* *
@@ -222,13 +221,15 @@ public class GuardService extends Service {
Observable.create(restSubscribe) Observable.create(restSubscribe)
.throttleFirst(1, TimeUnit.MINUTES) .throttleFirst(1, TimeUnit.MINUTES)
.subscribe(resetObserver); .subscribe(resetObserver);
Aria.download(this).register();
Aria.download(this).resumeAllTask();
} }
@Override @Override
public int onStartCommand(Intent intent, int flags, int startId) { public int onStartCommand(Intent intent, int flags, int startId) {
Log.e(TAG, "onStartCommand: "); Log.e(TAG, "onStartCommand: ");
Aria.download(this).register();
Aria.download(this).resumeAllTask();
// 绑定建立链接 // 绑定建立链接
bindService(new Intent(this, StepService.class), mServiceConnection, Context.BIND_IMPORTANT); bindService(new Intent(this, StepService.class), mServiceConnection, Context.BIND_IMPORTANT);
return START_STICKY; return START_STICKY;

View File

@@ -26,7 +26,6 @@ import androidx.core.content.FileProvider;
import com.aoleyun.sn.BuildConfig; import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.bean.UploadAppInfo; import com.aoleyun.sn.bean.UploadAppInfo;
import com.aoleyun.sn.comm.CommonConfig; import com.aoleyun.sn.comm.CommonConfig;
import com.aoleyun.sn.comm.JGYActions;
import com.aoleyun.sn.comm.PackageNames; import com.aoleyun.sn.comm.PackageNames;
import com.aoleyun.sn.gson.GsonUtils; import com.aoleyun.sn.gson.GsonUtils;
import com.aoleyun.sn.push.PushManager; import com.aoleyun.sn.push.PushManager;
@@ -47,12 +46,10 @@ import java.io.OutputStream;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.function.Predicate;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
@@ -116,6 +113,7 @@ public class ApkUtils {
this.add("com.aoleyunos.dop9"); this.add("com.aoleyunos.dop9");
this.add("com.aoleyunos.dop10"); this.add("com.aoleyunos.dop10");
this.add("com.schoolos.cmcc"); this.add("com.schoolos.cmcc");
this.add("com.aoleyunos.natuer");
// this.add("com.uiuios.jgy1"); // this.add("com.uiuios.jgy1");
// this.add("com.uiuios.jgy2"); // this.add("com.uiuios.jgy2");
// this.add("com.android.uiuios"); // this.add("com.android.uiuios");
@@ -1397,6 +1395,7 @@ public class ApkUtils {
this.add("com.uiui.speed"); this.add("com.uiui.speed");
this.add("com.books.wisdom"); this.add("com.books.wisdom");
this.add("com.schoolos.cmcc"); this.add("com.schoolos.cmcc");
this.add("com.aoleyunos.natuer");
}}; }};
public static final HashSet<String> G30_APP = new HashSet<String>() {{ public static final HashSet<String> G30_APP = new HashSet<String>() {{

View File

@@ -864,6 +864,7 @@ public class JgyUtils {
this.add("com.aoleyunos.dop9"); this.add("com.aoleyunos.dop9");
this.add("com.aoleyunos.dop10"); this.add("com.aoleyunos.dop10");
this.add("com.schoolos.cmcc"); this.add("com.schoolos.cmcc");
this.add("com.aoleyunos.natuer");
}}; }};
public void setAppNetwork(HashSet<String> blackList, HashSet<String> whiteList) { public void setAppNetwork(HashSet<String> blackList, HashSet<String> whiteList) {
@@ -1456,6 +1457,7 @@ public class JgyUtils {
this.add("com.aoleyunos.dop9"); this.add("com.aoleyunos.dop9");
this.add("com.aoleyunos.dop10"); this.add("com.aoleyunos.dop10");
this.add("com.schoolos.cmcc"); this.add("com.schoolos.cmcc");
this.add("com.aoleyunos.natuer");
this.add("com.aoleyun.info"); this.add("com.aoleyun.info");
this.add("com.calculator.uiui"); this.add("com.calculator.uiui");
this.add("com.notepad.uiui"); this.add("com.notepad.uiui");
@@ -1581,6 +1583,7 @@ public class JgyUtils {
if (data == null || data.size() <= 0) { if (data == null || data.size() <= 0) {
return; return;
} }
Log.e(TAG, "forceDownload: data size = " + data.size());
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
for (int i = 0; i < data.size(); i++) { for (int i = 0; i < data.size(); i++) {
ForceDownloadData forceDownloadData = data.get(i); ForceDownloadData forceDownloadData = data.get(i);
@@ -1620,11 +1623,14 @@ public class JgyUtils {
if (app_version_code > appVersionCode) { if (app_version_code > appVersionCode) {
Log.e("forceDownload ", "download URL " + app_url); Log.e("forceDownload ", "download URL " + app_url);
Utils.ariaDownload(mContext, app_url, jsonObject); Utils.ariaDownload(mContext, app_url, jsonObject);
} else {
Log.e(TAG, "forceDownload: installed skip");
} }
} else { } else {
Log.e("forceDownload ", "download URL " + app_url); Log.e("forceDownload ", "download URL " + app_url);
Utils.ariaDownload(mContext, app_url, jsonObject); Utils.ariaDownload(mContext, app_url, jsonObject);
} }
startServices(mContext);
} }
} }
@@ -1874,6 +1880,7 @@ public class JgyUtils {
this.add("com.aoleyunos.dop9"); this.add("com.aoleyunos.dop9");
this.add("com.aoleyunos.dop10"); this.add("com.aoleyunos.dop10");
this.add("com.schoolos.cmcc"); this.add("com.schoolos.cmcc");
this.add("com.aoleyunos.natuer");
}}; }};
HashSet<String> aihuaAppList = new HashSet<String>() {{ HashSet<String> aihuaAppList = new HashSet<String>() {{
@@ -3138,14 +3145,25 @@ public class JgyUtils {
Log.e(TAG, "wakeUpNotify: "); Log.e(TAG, "wakeUpNotify: ");
//启动通知 //启动通知
Intent bootIntent = new Intent(BootReceiver.BOOT_COMPLETED); Intent bootIntent = new Intent(BootReceiver.BOOT_COMPLETED);
bootIntent.setPackage("com.aoleyun.info");
bootIntent.setComponent(new ComponentName(PACKAGE_NOTIFY, CLASS_NOTIFY)); bootIntent.setComponent(new ComponentName(PACKAGE_NOTIFY, CLASS_NOTIFY));
mContext.sendBroadcast(bootIntent); mContext.sendBroadcast(bootIntent);
// Intent intent = new Intent();
// intent.setComponent(new ComponentName("com.aoleyun.info", "com.aoleyun.info.service.main.MainService"));
// intent.setPackage("com.aoleyun.info");
//// intent.setClassName("com.aoleyun.info", "com.aoleyun.info.service.main.MainService");
// try {
// mContext.startService(intent);
// } catch (Exception e) {
// Log.e(TAG, "wakeUpNotify: " + e.getMessage());
// }
} }
@Deprecated @Deprecated
public void wakeUpAoleyunAPP() { public void wakeUpAoleyunAPP() {
// wakeUpAppstore(); wakeUpAppstore();
// wakeUpNotify(); wakeUpNotify();
} }
public static String getModel() { public static String getModel() {

View File

@@ -1269,46 +1269,46 @@ public class SysSettingUtils {
*/ */
private static void setSettingsMenuShow(Context context, JsonObject jsonObject) { private static void setSettingsMenuShow(Context context, JsonObject jsonObject) {
List<String> menus = new ArrayList<>(); List<String> menus = new ArrayList<>();
// OTA升级管控 (默认允许) // // OTA升级管控 (默认允许)
int ota_upgrade_control = jsonObject.get("ota_upgrade_control").getAsInt(); // int ota_upgrade_control = jsonObject.get("ota_upgrade_control").getAsInt();
if (ota_upgrade_control == 0) { // if (ota_upgrade_control == 0) {
menus.add("system_updates"); // menus.add("system_updates");
} // }
// 生物识别和密码 (默认允许) // // 生物识别和密码 (默认允许)
int biometric_and_password = jsonObject.get("biometric_and_password").getAsInt(); // int biometric_and_password = jsonObject.get("biometric_and_password").getAsInt();
if (biometric_and_password == 0) { // if (biometric_and_password == 0) {
menus.add("biometrics_password"); // menus.add("biometrics_password");
} // }
// 省电模式 (默认允许) // 省电模式 (默认允许)
int power_saving_mode = jsonObject.get("power_saving_mode").getAsInt(); int power_saving_mode = jsonObject.get("power_saving_mode").getAsInt();
if (power_saving_mode == 0) { if (power_saving_mode == 0) {
menus.add("battery"); menus.add("battery");
} }
// 安全 (默认允许) // // 安全 (默认允许)
int security = jsonObject.get("security").getAsInt(); // int security = jsonObject.get("security").getAsInt();
if (security == 0) { // if (security == 0) {
menus.add("security"); // menus.add("security");
} // }
// 大屏特色功能 (默认允许) // // 大屏特色功能 (默认允许)
int large_screen_features = jsonObject.get("large_screen_features").getAsInt(); // int large_screen_features = jsonObject.get("large_screen_features").getAsInt();
if (large_screen_features == 0) { // if (large_screen_features == 0) {
// menus.add(""); //// menus.add("");
} // }
// 辅助功能 (默认允许) // // 辅助功能 (默认允许)
int accessibility = jsonObject.get("accessibility").getAsInt(); // int accessibility = jsonObject.get("accessibility").getAsInt();
if (accessibility == 0) { // if (accessibility == 0) {
menus.add("accessibility"); // menus.add("accessibility");
} // }
// 隐私 (默认允许) // // 隐私 (默认允许)
int privacy = jsonObject.get("privacy").getAsInt(); // int privacy = jsonObject.get("privacy").getAsInt();
if (privacy == 0) { // if (privacy == 0) {
menus.add("privacy"); // menus.add("privacy");
} // }
// 更多链接 (默认允许) // // 更多链接 (默认允许)
int more_links = jsonObject.get("more_links").getAsInt(); // int more_links = jsonObject.get("more_links").getAsInt();
if (more_links == 0) { // if (more_links == 0) {
menus.add("more_connections"); // menus.add("more_connections");
} // }
// 通知和状态栏 (默认允许) // 通知和状态栏 (默认允许)
int notification_and_status_bar = jsonObject.get("notification_and_status_bar").getAsInt(); int notification_and_status_bar = jsonObject.get("notification_and_status_bar").getAsInt();
if (notification_and_status_bar == 0) { if (notification_and_status_bar == 0) {
@@ -1319,46 +1319,47 @@ public class SysSettingUtils {
if (app_management_general == 0) { if (app_management_general == 0) {
menus.add("apps"); menus.add("apps");
} }
// 荣耀账号登录 (默认禁止) // // 荣耀账号登录 (默认禁止)
int honor_account_login = jsonObject.get("honor_account_login").getAsInt(); // int honor_account_login = jsonObject.get("honor_account_login").getAsInt();
if (honor_account_login == 0) { // if (honor_account_login == 0) {
menus.add("honor_id"); // menus.add("honor_id");
} // }
// 智慧互联 (默认禁止) // // 智慧互联 (默认禁止)
int smart_interconnect = jsonObject.get("smart_interconnect").getAsInt(); // int smart_interconnect = jsonObject.get("smart_interconnect").getAsInt();
if (smart_interconnect == 0) { // if (smart_interconnect == 0) {
menus.add("super_device"); // menus.add("super_device");
} // }
// VPN管控 (默认禁止) // // VPN管控 (默认禁止)
int vpn_control = jsonObject.get("vpn_control").getAsInt(); // int vpn_control = jsonObject.get("vpn_control").getAsInt();
if (vpn_control == 0) { // if (vpn_control == 0) {
menus.add("vpn_settings"); // menus.add("vpn_settings");
} // }
// 默认应用 (默认禁止) // // 默认应用 (默认禁止)
int default_applications = jsonObject.get("default_applications").getAsInt(); // int default_applications = jsonObject.get("default_applications").getAsInt();
if (default_applications == 0) { // if (default_applications == 0) {
// menus.add(""); //// menus.add("");
} // }
// 应用分身 (默认禁止) // // 应用分身 (默认禁止)
int app_cloning = jsonObject.get("app_cloning").getAsInt(); // int app_cloning = jsonObject.get("app_cloning").getAsInt();
if (app_cloning == 0) { // if (app_cloning == 0) {
menus.add("apps_clone"); // menus.add("apps_clone");
} // }
// 应用启动管理 (默认禁止) // // 应用启动管理 (默认禁止)
int app_startup_management = jsonObject.get("app_startup_management").getAsInt(); // int app_startup_management = jsonObject.get("app_startup_management").getAsInt();
if (app_startup_management == 0) { // if (app_startup_management == 0) {
menus.add("apps_startup_management"); // menus.add("apps_startup_management");
} // }
// 应用管理 (默认禁止) // 应用管理 (默认禁止)
int app_management_control = jsonObject.get("app_management_control").getAsInt(); // int app_management_control = jsonObject.get("app_management_control").getAsInt();
if (app_management_control == 0) { // if (app_management_control == 0) {
menus.add("apps_management"); // menus.add("apps_management");
menus.add("apps_honor_tips"); // menus.add("apps_honor_tips");
} // }
// Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, String.join(",", menus)); Log.e(TAG, "setSettingsMenuShow: " + menus);
Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, String.join(",", menus));
} }
private static void setSettingsMenuShow(Context context) { private static void setSettingsMenuShow(Context context) {
// Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, ""); Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, "");
} }
} }

View File

@@ -56,6 +56,9 @@ public class URLUtils {
} }
whiteIPList.removeIf(TextUtils::isEmpty); whiteIPList.removeIf(TextUtils::isEmpty);
Log.e(TAG, "getBrowserWhiteList: " + "oldwhiteList is : " + oldwhiteList); Log.e(TAG, "getBrowserWhiteList: " + "oldwhiteList is : " + oldwhiteList);
if (TextUtils.isEmpty(oldwhiteList)) {
return;
}
HashSet<String> URLList = new HashSet<>(Arrays.asList(oldwhiteList.trim().split(","))); HashSet<String> URLList = new HashSet<>(Arrays.asList(oldwhiteList.trim().split(",")));
URLList.removeIf(TextUtils::isEmpty); URLList.removeIf(TextUtils::isEmpty);
if (URLList.size() == 0 && whiteIPList.size() == 0) { if (URLList.size() == 0 && whiteIPList.size() == 0) {

View File

@@ -873,6 +873,9 @@ public class Utils {
@SuppressLint({"MissingPermission", "HardwareIds"}) @SuppressLint({"MissingPermission", "HardwareIds"})
public static String getSn() { public static String getSn() {
// if (BuildConfig.DEBUG) {
// return "GMG1096250930004";
// }
String serial = "unknow"; String serial = "unknow";
try { try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+