From b8a5454a0d99a4f8846a7bbe4bf8f9c12bd64a42 Mon Sep 17 00:00:00 2001 From: tongtongstudio Date: Mon, 2 Mar 2026 16:04:52 +0800 Subject: [PATCH] =?UTF-8?q?version:1.6.0226=20bugfixes:=20add:=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0g128t=E5=B9=B3=E5=8F=B0=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=80=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 27 ++++- app/keystore/HuaruianG128T.jks | Bin 0 -> 2685 bytes .../sn/activity/main/MainActivity.java | 8 +- .../com/aoleyun/sn/comm/CommonConfig.java | 2 + .../sn/network/NetInterfaceManager.java | 9 +- .../com/aoleyun/sn/service/RemoteService.java | 6 +- .../aoleyun/sn/service/main/MainService.java | 13 ++- .../java/com/aoleyun/sn/utils/JgyUtils.java | 38 +++++-- .../com/aoleyun/sn/utils/SysSettingUtils.java | 106 +++++++++++++++++- .../main/java/com/aoleyun/sn/utils/Utils.java | 1 + 10 files changed, 184 insertions(+), 26 deletions(-) create mode 100644 app/keystore/HuaruianG128T.jks diff --git a/app/build.gradle b/app/build.gradle index efbac19..ec5f405 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,8 +29,8 @@ android { defaultConfig { applicationId "com.aoleyun.sn" - versionCode 200 - versionName "1.5.1216" + versionCode 206 + versionName "1.6.0226" //There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature. minSdkVersion 24 @@ -270,9 +270,32 @@ android { v1SigningEnabled true v2SigningEnabled true } + + G128T { + storeFile file("keystore/HuaruianG128T.jks") + storePassword "123456" + keyAlias "g128t" + keyPassword "123456" + v1SigningEnabled true + v2SigningEnabled true + } } buildTypes { + G128TDebug.initWith(debug) + G128TDebug { + buildConfigField "String", "platform", '"G128T"' + versionNameSuffix "-debug" + debuggable true + signingConfig signingConfigs.G128T + } + + G128TRelease.initWith(release) + G128TRelease { + buildConfigField "String", "platform", '"G128T"' + signingConfig signingConfigs.G128T + } + MT6765Debug.initWith(debug) MT6765Debug { buildConfigField "String", "platform", '"MT6765"' diff --git a/app/keystore/HuaruianG128T.jks b/app/keystore/HuaruianG128T.jks new file mode 100644 index 0000000000000000000000000000000000000000..75558cc702bd903dc7e0e6590a52942bb651b1a8 GIT binary patch literal 2685 zcmY+Ec{~#iAIFDn*c{C@b2RsnYjew7O({o_O~|<=SMFGD%@vKX&>A^%rF6N^M7i=5 zk;qwu+*ghXkLP(k&+qs8{qcQ$U$6J)^Zow$Mv)<*%uFmOGDH>3ek$R7!VV`BD^orh zA_*izkjGdUMFzS5BLdk1$spV@wmcqlF!X;{91tevd@^t!MF#Gm6M`0iN*t+fADZ}Xu97lrvHcF|$}d@Y z2^?@O%RB1zqwlwGA(JZ%KHpLs5#ir#G0diKq#VufQa$eU-?nfCxO-97rP@PKPTheH zXK5?Jh4x}IT(_!J7z{^8)Ux5)FTetji#_^^6qBLo;70CUm6zr*=E?6H>c*cih6qqx zBsnE>lY|N`h7U!`K-_q}i5Lon2V7|@r`x_-Q5)IWjD1~MResaNA(7UTeP;hjEz)?m z`0M2>oRr2{-Aq30+x}^xFMb!>r9ig?xO<1=a1;@>p31W~;v<&+lo9PSGb&`x;OiyW z_>5st`=dkr7BWQOa!t;ZK@_;nVN5I6?AKEqB#+c?c*=bphTWN~?_cu@wmM|H=Xwv7 zML&gz5Q&LmL$v;ut6s2wlAl*Ui==y(|7ciPvFqK&gXVQ4R;pOt0Ohn+ctbS|we?ha zH^|afUZ8Z_Dy@mFvP&yNwsj{>P(B>B0z97-K(s2AkB`q+k-G3vsen*0mGf>sJeBF& z&Rb=geSOLqgIM(7ntsO7LGXpJs8%$vjM#$U@;9^R&@vb6iaWEekZ?DZU zeXFdpgxX@8v;n12#;;=LgTAxpL5#a%<=yKVd(h0@>D?SM?!M|Otowwi+X6tzY_W7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&RMbUeLAd?t5lMYpcp~NHR---f_a{a_50@jx;;mj}eU!1WH>Bp?MNiYmeNv!sLjQE`*TsPu zJLeKT&!D5NS+uFWb8ug%_n?HLO;6s=;JH3qCcoa3H#H}#v?5_c5(O6*QlL`igVT3n z9f+Q~N=-$Y6Of2a*6JGd^IM}A-iv7mm7zO$6{2N{4!Ow_Wj}+4DS;Tx_p!2 zd7;?%^S>U2GOrigVt36G+~M5q4E=doqfWS9#MlXO{{EG-7@k?hF};GHH!n#z&s5vo z^W1ZiHuvj9(Au!cTAj5O`p2*#hikH#N$69e3nscT z?%<~cz194e6Kh|1!f}sZc+0)I6Rz8^TII~U@*;=?y^yn`^(p@_(|lHn8sY}SPt-^ fAE)Z)w+}A;j?)Q!ezC`umO_j=&CSfhl#u^#x18aO literal 0 HcmV?d00001 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 7e409f4..ea3ca93 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 @@ -160,10 +160,10 @@ public class MainActivity extends BaseMvvmActivity(tagSets).toArray(new String[tagSets.size()]); CloudPushService pushService = PushServiceFactory.getCloudPushService(); pushService.bindTag(CloudPushService.DEVICE_TARGET, tag, null, new CommonCallback() { @Override public void onSuccess(String s) { - Log.e("clearAndAppendTags", "bind tag " + Arrays.toString(tag) + " success\n"); + Log.e("AliyunPush", "bind tag " + Arrays.toString(tag) + " success\n"); } @Override public void onFailed(String errorCode, String errorMsg) { - Log.e("clearAndAppendTags", "bind tag " + Arrays.toString(tag) + " failed." + + Log.e("AliyunPush", "bind tag " + Arrays.toString(tag) + " failed." + "errorCode: " + errorCode + ", errorMsg:" + errorMsg + "\n"); BaseApplication.onTagOperatorResult(errorCode); } diff --git a/app/src/main/java/com/aoleyun/sn/service/RemoteService.java b/app/src/main/java/com/aoleyun/sn/service/RemoteService.java index a569588..1292ab7 100644 --- a/app/src/main/java/com/aoleyun/sn/service/RemoteService.java +++ b/app/src/main/java/com/aoleyun/sn/service/RemoteService.java @@ -50,9 +50,13 @@ public class RemoteService extends Service { return locked == JGYActions.FRAME_CODE_LOCKED; } + /** + * @return 是否关闭 + * @throws RemoteException + */ @Override public boolean isBrowserInput() throws RemoteException { - int state = Settings.System.getInt(getContentResolver(), "qch_Browser_input", 1); + int state = Settings.System.getInt(getContentResolver(), "qch_Browser_input", 0); return state == 0; } 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 8003374..68bacb1 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 @@ -23,6 +23,7 @@ import android.os.Binder; import android.os.Build; import android.os.Handler; import android.os.IBinder; +import android.os.Looper; import android.os.RemoteException; import android.provider.Settings; import android.text.TextUtils; @@ -115,8 +116,8 @@ public class MainService extends Service implements MainSContact.MainView, Netwo if (!checkAoleyunApp()) { mPresenter.checkAoleyunUpdate(); } - mInternetConnected.onConnected(WiFiAlias); } + mInternetConnected.onConnected(WiFiAlias); } private class TimeTask extends AsyncTask { @@ -494,7 +495,13 @@ public class MainService extends Service implements MainSContact.MainView, Netwo boolean reboot = mMMKV.decodeBool(CommonConfig.DEVICES_REBOOT, true); if (reboot) { - mPresenter.getLockedState(); + new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { + @Override + public void run() { + mPresenter.getLockedState(); + } + }, 20000); + mMMKV.encode(CommonConfig.DEVICES_REBOOT, false); Log.e(TAG, "onCreate: device rebooted"); } else { @@ -616,7 +623,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo .subscribe(killObserver); Observable.create(networkSubscribe) - .throttleLast(1, TimeUnit.HOURS) + .throttleFirst(1, TimeUnit.HOURS) .subscribe(networkObserver); JgyUtils.getInstance().checkAoleyunApp(); 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 f72665b..844776b 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/JgyUtils.java @@ -165,6 +165,7 @@ public class JgyUtils { public static final int seewoPlatform = 25; public static final int U1302Platform = 26; public static final int MT6765Platform = 28; + public static final int G128TPlatform = 29; public static final String Other = "其他"; @@ -189,6 +190,7 @@ public class JgyUtils { public static final String seewoTag = "seewo"; public static final String allwinner_U1302 = "QZA15"; public static final String MT6765_TAG = "MT6765"; + public static final String G128T_TAG = "G128T"; private CacheHelper cacheHelper; @@ -337,6 +339,9 @@ public class JgyUtils { } else if (MT6765_TAG.equalsIgnoreCase(platform)) { Log.i(TAG, "checkAppPlatform: " + "MT6765"); return MT6765Platform; + } else if (G128T_TAG.equalsIgnoreCase(platform)) { + Log.i(TAG, "checkAppPlatform: " + "G128T"); + return G128TPlatform; } else { Log.i(TAG, "checkAppPlatform: " + "没有数据"); return UnknowPlatform; @@ -401,6 +406,8 @@ public class JgyUtils { getAppPlatformCallback.AppPlatform(U1302Platform); } else if (MT6765_TAG.equalsIgnoreCase(platform)) { getAppPlatformCallback.AppPlatform(MT6765Platform); + } else if (G128T_TAG.equalsIgnoreCase(platform)) { + getAppPlatformCallback.AppPlatform(G128TPlatform); } else { getAppPlatformCallback.AppPlatform(UnknowPlatform); } @@ -1015,18 +1022,22 @@ 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" ); + 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); - // TODO: 2024/9/11 修复1.4.0907版本数据为空系统报错 - CmdUtil.Result result = CmdUtil.execute(" settings delete system app_view_click_disabled"); - Log.e(TAG, "writeDeselectIDtoSystem: " + result); - } catch (Exception e) { - e.printStackTrace(); + if ("G10".equals(Build.MODEL) || "D1".equals(Build.MODEL)) { + Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, "com.arivoc.wordhd:2131624676,2131624689;com.ttstd.utils:12345"); + } else { + try { + Settings.System.putString(crv, CommonConfig.APP_VIEW_CLICK_DISABLED, null); + // TODO: 2024/9/11 修复1.4.0907版本数据为空系统报错 + CmdUtil.Result result = CmdUtil.execute(" settings delete system app_view_click_disabled"); + Log.e(TAG, "writeDeselectIDtoSystem: " + result); + } catch (Exception e) { + e.printStackTrace(); + } } } else { String s = appIDList.stream().map(new Function() { @@ -1468,6 +1479,9 @@ public class JgyUtils { pkgSet.addAll(ApkUtils.desktopAPP); pkgSet.addAll(ApkUtils.aoleyunAPP); pkgSet.addAll(ApkUtils.mJxwApp); + if (G128T_TAG.equals(BuildConfig.platform)) { + pkgSet.add("com.dmjc.xinhuo"); + } if ("K101".equals(Build.MODEL) || "AS001".equals(Build.MODEL)) { pkgSet.addAll(ApkUtils.aihuaApp); pkgSet.addAll(aihuaAppList); @@ -1581,7 +1595,7 @@ public class JgyUtils { jsonObject.addProperty("app_id", app_id); jsonObject.addProperty("MD5", app_md5); long app_version_code = forceDownloadData.getApp_version_code(); - Log.e("fht ", "packageName=" + app_package + ",URL= " + app_url + ",app_version_code=" + app_version_code); + Log.e("forceDownload", "packageName=" + app_package + ",URL= " + app_url + ",app_version_code=" + app_version_code); if (BuildConfig.APPLICATION_ID.equals(data.get(i).getApp_package())) { continue;//为自身的跳过下载 } @@ -2115,7 +2129,9 @@ public class JgyUtils { Log.e(TAG, "setDeveloperOptions: oldStatu = " + oldStatu + " no changed"); } - if (MT8768Tag.equalsIgnoreCase(BuildConfig.platform)) { + if (MT8768Tag.equalsIgnoreCase(BuildConfig.platform) + || G128T_TAG.equalsIgnoreCase(BuildConfig.platform) + ) { Settings.System.putInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, state); } else { //这个需要反着来 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 7094ff0..d94dd31 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java @@ -73,6 +73,7 @@ public class SysSettingUtils { setNotification(context, jsonObject); setPanelShow(context, jsonObject); setDisAllowCamera(context, jsonObject); + setSettingsMenuShow(context, jsonObject); } @@ -100,7 +101,7 @@ public class SysSettingUtils { setWallpaper(context, 0); setCanReset(context, 0); setAutoTime(context, 1); - setBrowserInput(context, 1); + setBrowserInput(context, 0); if (!BuildConfig.DEBUG) { // JgyUtils.getInstance().setDeveloperOptions(0); } @@ -108,6 +109,8 @@ public class SysSettingUtils { setAdminApp(context, 1); setSystemAppDisable(context, 0); setNotification(context, 0); + setSettingsMenuShow(context); + } /** @@ -130,7 +133,7 @@ public class SysSettingUtils { setWallpaper(context, 0); setCanReset(context, 0); setAutoTime(context, 0); - setBrowserInput(context, 0); + setBrowserInput(context, 1); // JgyUtils.getInstance().setDeveloperOptions(1); setStatusBar(context, 0); setAdminApp(context, 0); @@ -1257,6 +1260,105 @@ public class SysSettingUtils { Log.e("setDisAllowCamera", "setDisAllowCamera: " + camera_ctrl); Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_DISALLOW_CAMERA, changeNum(camera_ctrl)); } + } + /** + * @param context + * @param jsonObject key的定义为:”wlan”:网络和互联网,”connected_devices”:已连接的设备,”apps”:应用,”notifications”:通知,”display”:显示, + * ”sound”:提示音,”storage”:存储,”battery”:电池,”wallpaper”:壁纸,”location”:位置信息,”system”:系统,”about”:关于。 + */ + private static void setSettingsMenuShow(Context context, JsonObject jsonObject) { + List menus = new ArrayList<>(); + // OTA升级管控 (默认允许) + int ota_upgrade_control = jsonObject.get("ota_upgrade_control").getAsInt(); + if (ota_upgrade_control == 0) { + menus.add("system_updates"); + } + // 生物识别和密码 (默认允许) + int biometric_and_password = jsonObject.get("biometric_and_password").getAsInt(); + if (biometric_and_password == 0) { + menus.add("biometrics_password"); + } + // 省电模式 (默认允许) + int power_saving_mode = jsonObject.get("power_saving_mode").getAsInt(); + if (power_saving_mode == 0) { + menus.add("battery"); + } + // 安全 (默认允许) + int security = jsonObject.get("security").getAsInt(); + if (security == 0) { + menus.add("security"); + } + // 大屏特色功能 (默认允许) + int large_screen_features = jsonObject.get("large_screen_features").getAsInt(); + if (large_screen_features == 0) { +// menus.add(""); + } + // 辅助功能 (默认允许) + int accessibility = jsonObject.get("accessibility").getAsInt(); + if (accessibility == 0) { + menus.add("accessibility"); + } + // 隐私 (默认允许) + int privacy = jsonObject.get("privacy").getAsInt(); + if (privacy == 0) { + menus.add("privacy"); + } + // 更多链接 (默认允许) + int more_links = jsonObject.get("more_links").getAsInt(); + if (more_links == 0) { + menus.add("more_connections"); + } + // 通知和状态栏 (默认允许) + int notification_and_status_bar = jsonObject.get("notification_and_status_bar").getAsInt(); + if (notification_and_status_bar == 0) { + menus.add("notifications"); + } + // 应用管理 (默认允许) + int app_management_general = jsonObject.get("app_management_general").getAsInt(); + if (app_management_general == 0) { + menus.add("apps"); + } + // 荣耀账号登录 (默认禁止) + int honor_account_login = jsonObject.get("honor_account_login").getAsInt(); + if (honor_account_login == 0) { + menus.add("honor_id"); + } + // 智慧互联 (默认禁止) + int smart_interconnect = jsonObject.get("smart_interconnect").getAsInt(); + if (smart_interconnect == 0) { + menus.add("super_device"); + } + // VPN管控 (默认禁止) + int vpn_control = jsonObject.get("vpn_control").getAsInt(); + if (vpn_control == 0) { + menus.add("vpn_settings"); + } + // 默认应用 (默认禁止) + int default_applications = jsonObject.get("default_applications").getAsInt(); + if (default_applications == 0) { +// menus.add(""); + } + // 应用分身 (默认禁止) + int app_cloning = jsonObject.get("app_cloning").getAsInt(); + if (app_cloning == 0) { + menus.add("apps_clone"); + } + // 应用启动管理 (默认禁止) + int app_startup_management = jsonObject.get("app_startup_management").getAsInt(); + if (app_startup_management == 0) { + menus.add("apps_startup_management"); + } + // 应用管理 (默认禁止) + int app_management_control = jsonObject.get("app_management_control").getAsInt(); + if (app_management_control == 0) { + menus.add("apps_management"); + menus.add("apps_honor_tips"); + } +// Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, String.join(",", menus)); + } + + private static void setSettingsMenuShow(Context context) { +// Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, ""); } } 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 ccd3a41..678459b 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/Utils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/Utils.java @@ -1833,6 +1833,7 @@ public class Utils { || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.seewoPlatform || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.U1302Platform || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform + || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G128TPlatform ) { return Utils.getProperty("ro.build.display.id", "获取失败"); } else {