From b3bf7c77f513847db442704b605a6d8de6049945 Mon Sep 17 00:00:00 2001 From: tongtongstudio Date: Mon, 12 Oct 2026 15:31:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0onyx=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=87=8D=E5=AE=9A=E5=90=91=E5=B9=B6=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=BA=94=E7=94=A8=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 +-- src/com/aoleyun/os/Launcher.java | 2 +- src/com/aoleyun/os/model/LoaderTask.java | 6 ++++ .../aoleyun/os/touch/ItemClickHandler.java | 28 +++++++++++++++++++ src/com/aoleyun/os/uiuiutils/JgyUtils.java | 11 ++++++-- 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index e7ea50b..2a27fe4 100644 --- a/build.gradle +++ b/build.gradle @@ -75,8 +75,8 @@ android { minSdkVersion 26 targetSdkVersion 28 - versionCode 211 - versionName "1.6.0920" + versionCode 215 + versionName "1.6.0930" ndk { //选择要添加的对应 cpu 类型的 .so 库。 diff --git a/src/com/aoleyun/os/Launcher.java b/src/com/aoleyun/os/Launcher.java index 29b27e0..44352fb 100644 --- a/src/com/aoleyun/os/Launcher.java +++ b/src/com/aoleyun/os/Launcher.java @@ -488,7 +488,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, || JgyUtils.getInstance().checkAppPlatform() == JgyUtils.seewoPlatform ) { wallpaperManager.setBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.wallpapers_aiudu)); -// } else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.QualcommPlatform) { + } else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.QualcommPlatform) { // wallpaperManager.clear(); } else { wallpaperManager.setBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.wallpapers)); diff --git a/src/com/aoleyun/os/model/LoaderTask.java b/src/com/aoleyun/os/model/LoaderTask.java index 0e8d7e0..229d652 100644 --- a/src/com/aoleyun/os/model/LoaderTask.java +++ b/src/com/aoleyun/os/model/LoaderTask.java @@ -361,6 +361,7 @@ public class LoaderTask implements Runnable { this.add("com.ss.android.ugc.aweme"); this.add("com.tencent.mm"); this.add("com.google.android.inputmethod.pinyin"); + this.add("com.onyx"); }}; @@ -561,6 +562,11 @@ public class LoaderTask implements Runnable { ComponentName cn = intent.getComponent(); targetPkg = cn == null ? intent.getPackage() : cn.getPackageName(); + if (!TextUtils.isEmpty(targetPkg) && SYSTEM_HIDE_APP.contains(targetPkg)) { + c.markDeleted("System hide app removed: " + targetPkg); + continue; + } + if (allUsers.indexOfValue(c.user) < 0) { if (c.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT) { c.markDeleted("Legacy shortcuts are only allowed for current users"); diff --git a/src/com/aoleyun/os/touch/ItemClickHandler.java b/src/com/aoleyun/os/touch/ItemClickHandler.java index dd1500c..0251f76 100644 --- a/src/com/aoleyun/os/touch/ItemClickHandler.java +++ b/src/com/aoleyun/os/touch/ItemClickHandler.java @@ -23,6 +23,7 @@ import static com.aoleyun.os.ItemInfoWithIcon.FLAG_DISABLED_SUSPENDED; import static com.aoleyun.os.model.AppLaunchTracker.CONTAINER_ALL_APPS; import android.app.AlertDialog; +import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.os.Process; @@ -109,6 +110,19 @@ public class ItemClickHandler { } Object tag = v.getTag(); + + // 点击系统设置时,重定向到 onyx 设置页面 + String pkgName = getTagPackageName(tag); + if ("com.android.settings".equals(pkgName)) { + Intent onyxSettingsIntent = new Intent(); + onyxSettingsIntent.setComponent( + new ComponentName("com.onyx", "com.onyx.tablet.settings.SettingsActivity")); + onyxSettingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + launcher.startActivitySafely(v, onyxSettingsIntent, + tag instanceof ItemInfo ? (ItemInfo) tag : null, sourceContainer); + return; + } + if (tag instanceof WorkspaceItemInfo) { String packageName = ((WorkspaceItemInfo) tag).getTargetComponent().getPackageName(); if (is_forbid(v.getContext(), packageName)) { @@ -405,4 +419,18 @@ public class ItemClickHandler { } launcher.startActivitySafely(v, intent, item, sourceContainer); } + + /** + * 从点击的 tag 中提取包名,用于判断是否重定向到 onyx 设置页。 + */ + private static String getTagPackageName(Object tag) { + if (tag instanceof WorkspaceItemInfo) { + ComponentName cn = ((WorkspaceItemInfo) tag).getTargetComponent(); + return cn != null ? cn.getPackageName() : null; + } else if (tag instanceof AppInfo) { + ComponentName cn = ((AppInfo) tag).getTargetComponent(); + return cn != null ? cn.getPackageName() : null; + } + return null; + } } diff --git a/src/com/aoleyun/os/uiuiutils/JgyUtils.java b/src/com/aoleyun/os/uiuiutils/JgyUtils.java index 1a9a9a2..08bf171 100644 --- a/src/com/aoleyun/os/uiuiutils/JgyUtils.java +++ b/src/com/aoleyun/os/uiuiutils/JgyUtils.java @@ -127,10 +127,10 @@ public class JgyUtils { } else if (seewoTag.equalsIgnoreCase(platform)) { Log.i(TAG, "checkAppPlatform: " + "seewo"); return seewoPlatform; - }else if (Qualcomm_TAG.equalsIgnoreCase(platform)) { + } else if (Qualcomm_TAG.equalsIgnoreCase(platform)) { Log.i(TAG, "checkAppPlatform: " + "QualcommA"); return QualcommPlatform; - } else if (DX11_TAG.equalsIgnoreCase(platform)) { + } else if (DX11_TAG.equalsIgnoreCase(platform)) { Log.i(TAG, "checkAppPlatform: " + "DX11"); return DX11Platform; } else if (G12NL_TAG.equalsIgnoreCase(platform)) { @@ -313,6 +313,13 @@ public class JgyUtils { } public static boolean isDisable(Context context, String pkg) { + if ( + "org.chromium.chrome".equals(pkg) + || "com.onyx.appmarket".equals(pkg) +// || "com.onyx.easytransfer".equals(pkg) + ) { + return true; + } String aole_disable_app_list = Settings.Global.getString(context.getContentResolver(), "aole_disable_app_list"); if (TextUtils.isEmpty(aole_disable_app_list)) { return false;