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;