diff --git a/app/processor/src/main/java/com/hchen/database/HookBase.java b/app/processor/src/main/java/com/hchen/database/HookBase.java index ace3ac8e4c..e6a8c98808 100644 --- a/app/processor/src/main/java/com/hchen/database/HookBase.java +++ b/app/processor/src/main/java/com/hchen/database/HookBase.java @@ -1,3 +1,21 @@ +/* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ package com.hchen.database; import java.lang.annotation.ElementType; @@ -5,14 +23,29 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * @author 焕晨HChen + */ @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface HookBase { - String pkg(); + /* + * 目标作用域 + * */ + String targetPackage(); - boolean isPad(); + /* + * 目标安卓版本 + * */ + int targetSdk() default -1; - int tarSdkVersion(); + /* + * 目标 ROM 版本 + * */ + float targetOSVersion() default -1F; - boolean skip() default false; + /* + * 是否是 pad 专属 + * */ + boolean isPad() default false; } diff --git a/app/processor/src/main/java/com/hchen/database/HookBaseProcessor.java b/app/processor/src/main/java/com/hchen/database/HookBaseProcessor.java index 621673bab6..8d87021729 100644 --- a/app/processor/src/main/java/com/hchen/database/HookBaseProcessor.java +++ b/app/processor/src/main/java/com/hchen/database/HookBaseProcessor.java @@ -1,3 +1,21 @@ +/* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ package com.hchen.database; import com.google.auto.service.AutoService; @@ -16,6 +34,9 @@ import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; +/** + * @author 焕晨HChen + */ @AutoService(Processor.class) @SupportedAnnotationTypes("com.hchen.database.HookBase") @SupportedSourceVersion(SourceVersion.RELEASE_21) @@ -29,46 +50,69 @@ public boolean process(Set annotations, RoundEnvironment delayedOutput(); try (Writer writer = processingEnv.getFiler().createSourceFile("com.sevtinge.hyperceiler.module.base.DataBase").openWriter()) { writer.write(""" + /* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ package com.sevtinge.hyperceiler.module.base; - + + import java.util.HashMap; + + /** + * 注解处理器自动生成的 Map 图 + * + * @author 焕晨HChen + */ public class DataBase { - public static class DataHelper { - public String fullName; - public int android; - public boolean isPad; - public boolean skip; - - public DataHelper(String fullName,int android,boolean isPad,boolean skip){ - this.fullName = fullName; - this.android = android; - this.isPad = isPad; - this.skip = skip; - } + public String mTargetPackage; + public int mTargetSdk; + public float mTargetOSVersion; + public boolean isPad; + + public DataBase(String targetPackage, int targetSdk, float targetOSVersion, boolean isPad){ + this.mTargetPackage = targetPackage; + this.mTargetSdk = targetSdk; + this.mTargetOSVersion = targetOSVersion; + this.isPad = isPad; } - - public static MultiValueMap get() { - MultiValueMap dataMap = new MultiValueMap<>(); + + public static HashMap get() { + HashMap dataMap = new HashMap<>(); """); roundEnv.getElementsAnnotatedWith(HookBase.class).forEach(new Consumer() { @Override public void accept(Element element) { String fullClassName = null; if (element instanceof TypeElement typeElement) { - fullClassName = getFullClassName(typeElement); + fullClassName = typeElement.getQualifiedName().toString(); // System.out.println("Full class name: " + fullClassName); } if (fullClassName == null) { System.out.println("W: Full class name is null!!!"); } HookBase hookBase = element.getAnnotation(HookBase.class); - String pkg = hookBase.pkg(); - int android = hookBase.tarSdkVersion(); + String targetPackage = hookBase.targetPackage(); + int targetSdk = hookBase.targetSdk(); + float targetOSVersion = hookBase.targetOSVersion(); boolean isPad = hookBase.isPad(); - boolean skip = hookBase.skip(); try { writer.write(" "); - writer.write("dataMap.put(\"" + pkg + "\", new DataHelper(\"" + fullClassName + "\", " - + android + ", " + isPad + ", " + skip + "));\n"); + writer.write("dataMap.put(\"" + fullClassName + "\", new DataBase(\"" + targetPackage + "\", " + + targetSdk + ", " + targetOSVersion + "F, " + isPad + "));\n"); } catch (IOException e) { e.printStackTrace(); } @@ -77,7 +121,6 @@ public void accept(Element element) { writer.write(""" return dataMap; } - } """); } catch (IOException e) { @@ -86,10 +129,6 @@ public void accept(Element element) { return true; } - private String getFullClassName(TypeElement typeElement) { - return typeElement.getQualifiedName().toString(); - } - /* ________ ___ ___ ________ ________ ___ ___ |\ _____\|\ \|\ \ |\ __ \ |\ __ \ |\ \ / /| @@ -119,7 +158,7 @@ private void delayedOutput() { System.out.println(BLUE + " \\|__| \\|_______| \\|__|\\|__| \\|__|\\|__||\\___/ / " + RESET); System.out.println(BLUE + " \\|___|/ " + RESET); System.out.println(BLUE + " " + RESET); - System.out.println(BLUE + " Code By HyperCeiler Contributors " + RESET); + System.out.println(BLUE + " Code By 焕晨HChen " + RESET); // 别改谢谢 } } \ No newline at end of file diff --git a/app/src/main/java/com/sevtinge/hyperceiler/Application.java b/app/src/main/java/com/sevtinge/hyperceiler/Application.java index 0309773af7..e36250011a 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/Application.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/Application.java @@ -1,21 +1,21 @@ /* - * This file is part of HyperCeiler. + * This file is part of HyperCeiler. - * HyperCeiler is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License. + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . - * Copyright (C) 2023-2024 HyperCeiler Contributions -*/ + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ package com.sevtinge.hyperceiler; import android.content.Context; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.java b/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.java index d754756c74..f4da929a47 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.java @@ -18,9 +18,28 @@ */ package com.sevtinge.hyperceiler; +import static com.sevtinge.hyperceiler.utils.Helpers.getPackageVersionCode; +import static com.sevtinge.hyperceiler.utils.Helpers.getPackageVersionName; +import static com.sevtinge.hyperceiler.utils.devicesdk.MiDeviceAppUtilsKt.isPad; +import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.getAndroidVersion; +import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.getHyperOSVersion; +import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.getMiuiVersion; +import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isAndroidVersion; +import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isHyperOSVersion; +import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMiuiVersion; +import static com.sevtinge.hyperceiler.utils.log.LogManager.logLevelDesc; +import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logE; +import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logI; +import static com.sevtinge.hyperceiler.utils.prefs.PrefsUtils.mPrefsMap; + +import android.os.Process; + import com.github.kyuubiran.ezxhelper.EzXHelper; import com.hchen.hooktool.HCInit; -import com.sevtinge.hyperceiler.module.base.BaseXposedInit; +import com.sevtinge.hyperceiler.module.app.VariousThirdApps; +import com.sevtinge.hyperceiler.module.base.BaseModule; +import com.sevtinge.hyperceiler.module.base.DataBase; +import com.sevtinge.hyperceiler.module.base.tool.ResourcesTool; import com.sevtinge.hyperceiler.module.hook.systemframework.AllowManageAllNotifications; import com.sevtinge.hyperceiler.module.hook.systemframework.AllowUninstall; import com.sevtinge.hyperceiler.module.hook.systemframework.BackgroundBlurDrawable; @@ -32,18 +51,41 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.network.FlightModeHotSpot; import com.sevtinge.hyperceiler.module.hook.systemsettings.VolumeSeparateControlForSettings; import com.sevtinge.hyperceiler.module.skip.SystemFrameworkForCorePatch; +import com.sevtinge.hyperceiler.safe.CrashHook; +import com.sevtinge.hyperceiler.utils.api.ProjectApi; import com.sevtinge.hyperceiler.utils.log.LogManager; +import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils; + +import java.io.File; +import java.lang.reflect.InvocationTargetException; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.BiConsumer; import de.robv.android.xposed.IXposedHookLoadPackage; import de.robv.android.xposed.IXposedHookZygoteInit; +import de.robv.android.xposed.XSharedPreferences; +import de.robv.android.xposed.XposedBridge; +import de.robv.android.xposed.XposedHelpers; import de.robv.android.xposed.callbacks.XC_LoadPackage; -public class XposedInit extends BaseXposedInit implements IXposedHookZygoteInit, IXposedHookLoadPackage { +public class XposedInit implements IXposedHookZygoteInit, IXposedHookLoadPackage { private static final String TAG = "HyperCeiler"; + public static boolean isSafeModeOn = false; + public static String mModulePath = null; + public static ResourcesTool mResHook; + + // public static XmlTool mXmlTool; + public final VariousThirdApps mVariousThirdApps = new VariousThirdApps(); @Override public void initZygote(StartupParam startupParam) throws Throwable { - super.initZygote(startupParam); + mResHook = new ResourcesTool(startupParam.modulePath); + mModulePath = startupParam.modulePath; + // mXmlTool = new XmlTool(startupParam); + setXSharedPrefs(); + EzXHelper.initZygote(startupParam); EzXHelper.setLogTag(TAG); EzXHelper.setToastTag(TAG); @@ -53,10 +95,7 @@ public void initZygote(StartupParam startupParam) throws Throwable { .setTag("HyperCeiler") ); HCInit.initStartupParam(startupParam); - loadZygoteHook(startupParam); - } - private static void loadZygoteHook(StartupParam startupParam) throws Throwable { if (mPrefsMap.getBoolean("system_framework_screen_all_rotations")) ScreenRotation.initRes(); if (mPrefsMap.getBoolean("system_framework_clean_share_menu")) CleanShareMenu.initRes(); if (mPrefsMap.getBoolean("system_framework_clean_open_menu")) CleanOpenMenu.initRes(); @@ -92,4 +131,147 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Th if (mPrefsMap.getBoolean("system_framework_network_flightmode_hotspot")) new FlightModeHotSpot().handleLoadPackage(lpparam); } + + private void setXSharedPrefs() { + if (mPrefsMap.isEmpty()) { + XSharedPreferences mXSharedPreferences; + try { + mXSharedPreferences = new XSharedPreferences(ProjectApi.mAppModulePkg, PrefsUtils.mPrefsName); + mXSharedPreferences.makeWorldReadable(); + Map allPrefs = mXSharedPreferences.getAll(); + + if (allPrefs != null && !allPrefs.isEmpty()) { + mPrefsMap.putAll(allPrefs); + } else { + mXSharedPreferences = new XSharedPreferences(new File(PrefsUtils.mPrefsFile)); + mXSharedPreferences.makeWorldReadable(); + allPrefs = mXSharedPreferences.getAll(); + + if (allPrefs != null && !allPrefs.isEmpty()) { + mPrefsMap.putAll(allPrefs); + } else { + logE("[UID" + Process.myUid() + "]", "Cannot read SharedPreferences, some mods might not work!"); + } + } + } catch (Throwable t) { + logE("setXSharedPrefs", t); + } + } + } + + private void init(XC_LoadPackage.LoadPackageParam lpparam) { + if (isSafeModeOn) return; + String packageName = lpparam.packageName; + if (Objects.equals(packageName, "android")) + logI(packageName, "androidVersion = " + getAndroidVersion() + ", miuiVersion = " + getMiuiVersion() + ", hyperosVersion = " + getHyperOSVersion()); + else + logI(packageName, "versionName = " + getPackageVersionName(lpparam) + ", versionCode = " + getPackageVersionCode(lpparam)); + + invokeInit(lpparam); + androidCrashEventHook(lpparam); + } + + private void invokeInit(XC_LoadPackage.LoadPackageParam lpparam) { + String mPkgName = lpparam.packageName; + if (mPkgName == null) return; + + if (ProjectApi.mAppModulePkg.equals(mPkgName)) { + moduleActiveHook(lpparam); + return; + } + + if (isInSafeMode(mPkgName) || isOtherRestrictions(mPkgName)) return; + + HashMap dataMap = DataBase.get(); + if (dataMap.values().stream().noneMatch(dataBase -> dataBase.mTargetPackage.equals(mPkgName))) { + mVariousThirdApps.init(lpparam); + return; + } + + dataMap.forEach(new BiConsumer() { + @Override + public void accept(String s, DataBase dataBase) { + if (!mPkgName.equals(dataBase.mTargetPackage)) + return; + if (!(dataBase.mTargetSdk == -1) && !isAndroidVersion(dataBase.mTargetSdk)) + return; + if (!(dataBase.mTargetOSVersion == -1F) && !(isHyperOSVersion(dataBase.mTargetOSVersion) || isMiuiVersion(dataBase.mTargetOSVersion))) + return; + if (dataBase.isPad != isPad()) + return; + + try { + Class clazz = getClass().getClassLoader().loadClass(s); + BaseModule module = (BaseModule) clazz.getDeclaredConstructor().newInstance(); + module.init(lpparam); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | + InstantiationException | InvocationTargetException e) { + logE(TAG, e); + } + } + }); + } + + private void androidCrashEventHook(XC_LoadPackage.LoadPackageParam lpparam) { + if ("android".equals(lpparam.packageName)) { + XposedBridge.log("[HyperCeiler][I]: Log level is " + logLevelDesc()); + try { + new CrashHook(lpparam); + } catch (Exception e) { + logE(TAG, e); + } + } + } + + private boolean isInSafeMode(String pkg) { + switch (pkg) { + case "com.android.systemui" -> { + return isSystemUIModuleEnable(); + } + case "com.miui.home" -> { + return isHomeModuleEnable(); + } + case "com.miui.securitycenter" -> { + return isSecurityCenterModuleEnable(); + } + } + return false; + } + + private boolean isOtherRestrictions(String pkg) { + switch (pkg) { + case "com.google.android.webview", "com.miui.contentcatcher", + "com.miui.catcherpatch" -> { + return true; + } + default -> { + return false; + } + } + } + + public void moduleActiveHook(XC_LoadPackage.LoadPackageParam lpparam) { + Class mHelpers = XposedHelpers.findClassIfExists(ProjectApi.mAppModulePkg + ".utils.Helpers", lpparam.classLoader); + + XposedHelpers.setStaticBooleanField(mHelpers, "isModuleActive", true); + XposedHelpers.setStaticIntField(mHelpers, "XposedVersion", XposedBridge.getXposedVersion()); + XposedBridge.log("[HyperCeiler][I]: Log level is " + logLevelDesc()); + } + + + private boolean isSafeModeEnable(String key) { + return mPrefsMap.getBoolean(key); + } + + private boolean isSystemUIModuleEnable() { + return isSafeModeEnable("system_ui_safe_mode_enable"); + } + + private boolean isHomeModuleEnable() { + return isSafeModeEnable("home_safe_mode_enable"); + } + + private boolean isSecurityCenterModuleEnable() { + return isSafeModeEnable("security_center_safe_mode_enable"); + } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/AiAsst.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/AiAsst.java index 30b9b86780..3317b273b7 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/AiAsst.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/AiAsst.java @@ -24,7 +24,7 @@ import com.sevtinge.hyperceiler.module.hook.aiasst.DisableWatermark; import com.sevtinge.hyperceiler.module.hook.aiasst.UnlockAllCaptions; -@HookBase(pkg = "com.xiaomi.aiasst.vision", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.aiasst.vision", isPad = false) public class AiAsst extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Analytics.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Analytics.java index 43af643292..5118dd2df7 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Analytics.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Analytics.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.analytics.FuckMiuiUpload; -@HookBase(pkg = "com.miui.analytics", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.analytics", isPad = false) public class Analytics extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Aod.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Aod.java index 677788e65c..c7abd2f960 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Aod.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Aod.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.aod.UnlockAlwaysOnDisplay; import com.sevtinge.hyperceiler.module.hook.aod.UnlockAodAon; -@HookBase(pkg = "com.miui.aod", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.aod", isPad = false) public class Aod extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Backup.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Backup.java index 95aa0f01b1..5a5a26b93e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Backup.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Backup.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.backup.AllowBackupAllApps; import com.sevtinge.hyperceiler.module.hook.backup.UnlockBrokenScreenBackup; -@HookBase(pkg = "com.miui.backup", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.backup", isPad = false) public class Backup extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Barrage.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Barrage.java index 264e2ba321..17d74447c4 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Barrage.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Barrage.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.barrage.AnyBarrage; import com.sevtinge.hyperceiler.module.hook.barrage.CustomBarrageLength; -@HookBase(pkg = "com.xiaomi.barrage", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.barrage", isPad = false) public class Barrage extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Browser.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Browser.java index ed3f38b17b..846663737c 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Browser.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Browser.java @@ -25,7 +25,7 @@ import com.sevtinge.hyperceiler.module.hook.browser.EnableDebugEnvironment; import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard; -@HookBase(pkg = "com.android.browser", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.browser", isPad = false) public class Browser extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Calendar.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Calendar.java index 6194f1ac9f..bda0a4a4b7 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Calendar.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Calendar.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.calendar.UnlockSubscription; -@HookBase(pkg = "com.android.calendar", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.calendar", isPad = false) public class Calendar extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Camera.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Camera.java index b8cb5c34ba..7edbf6689b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Camera.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Camera.java @@ -70,7 +70,7 @@ import com.sevtinge.hyperceiler.module.hook.camera.UnlockVlog; import com.sevtinge.hyperceiler.module.hook.camera.UnlockVlogPro; -@HookBase(pkg = "com.android.camera", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.camera", isPad = false) public class Camera extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Community.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Community.java index f4965d4607..34c09593d7 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Community.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Community.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.community.DeviceModify; -@HookBase(pkg = "com.xiaomi.vipaccount", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.vipaccount", isPad = false) public class Community extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ContentExtension.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ContentExtension.java index 4bbe49a4e2..fb161e7fdd 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ContentExtension.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ContentExtension.java @@ -30,7 +30,7 @@ import com.sevtinge.hyperceiler.module.hook.contentextension.UnlockTaplus; import com.sevtinge.hyperceiler.module.hook.contentextension.UseThirdPartyBrowser; -@HookBase(pkg = "com.miui.contentextension", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.contentextension", isPad = false) public class ContentExtension extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Creation.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Creation.java index b150a0d62e..f4be79353f 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Creation.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Creation.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.creation.UnlockCreation; import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard; -@HookBase(pkg = "com.miui.creation", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.creation", isPad = false) public class Creation extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Demo.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Demo.java index 683d081659..6420ebce24 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Demo.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Demo.java @@ -24,7 +24,7 @@ import com.sevtinge.hyperceiler.module.hook.demo.CrashDemo; import com.sevtinge.hyperceiler.module.hook.demo.ToastTest; -@HookBase(pkg = "com.hchen.demo", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.hchen.demo", isPad = false) public class Demo extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Downloads.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Downloads.java index dde32074b2..a3b4a99ac6 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Downloads.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Downloads.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.downloads.FuckXlDownload; -@HookBase(pkg = "com.android.providers.downloads", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.providers.downloads", isPad = false) public class Downloads extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/DownloadsUI.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/DownloadsUI.java index cb5ddb0f75..5e3129f38b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/DownloadsUI.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/DownloadsUI.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.downloadsui.AlwaysShowDownloadLink; -@HookBase(pkg = "com.android.providers.downloads.ui", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.providers.downloads.ui", isPad = false) public class DownloadsUI extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ExternalStorage.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ExternalStorage.java index 28d0c8671e..82258d3e48 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ExternalStorage.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ExternalStorage.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.externalstorage.DisableFolderCantUse; -@HookBase(pkg = "com.android.externalstorage", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.externalstorage", isPad = false) public class ExternalStorage extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/FileExplorer.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/FileExplorer.java index 3ebf746973..c10e615584 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/FileExplorer.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/FileExplorer.java @@ -24,7 +24,7 @@ import com.sevtinge.hyperceiler.module.hook.fileexplorer.UnlockFileParse; import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard; -@HookBase(pkg = "com.android.fileexplorer", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.fileexplorer", isPad = false) public class FileExplorer extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Gallery.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Gallery.java index bcaec1f923..ea3a207944 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Gallery.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Gallery.java @@ -35,7 +35,7 @@ import com.sevtinge.hyperceiler.module.hook.gallery.UnlockAIGallery; import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard; -@HookBase(pkg = "com.miui.gallery", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.gallery", isPad = false) public class Gallery extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/GetApps.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/GetApps.java index ad268cb6e3..585cafbd9b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/GetApps.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/GetApps.java @@ -25,7 +25,7 @@ import com.sevtinge.hyperceiler.module.hook.getapps.DisableAds; import com.sevtinge.hyperceiler.module.hook.getapps.DisablePackageMonitor; -@HookBase(pkg = "com.xiaomi.market", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.market", isPad = false) public class GetApps extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/GuardProvider.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/GuardProvider.java index 617e9c3957..b02873aadb 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/GuardProvider.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/GuardProvider.java @@ -1,28 +1,28 @@ /* - * This file is part of HyperCeiler. + * This file is part of HyperCeiler. - * HyperCeiler is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License. + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . - * Copyright (C) 2023-2024 HyperCeiler Contributions -*/ + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ package com.sevtinge.hyperceiler.module.app; import com.hchen.database.HookBase; import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.guardprovider.DisableUploadAppListNew; -@HookBase(pkg = "com.miui.guardprovider", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.guardprovider", isPad = false) public class GuardProvider extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeT.java index 7e501cb190..c657439e41 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeT.java @@ -142,7 +142,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.home", isPad = true, tarSdkVersion = 33) +@HookBase(targetPackage = "com.miui.home", isPad = true, targetSdk = 33) public class HomeT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeU.java index e76b9782ca..ba3a1007c8 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeU.java @@ -142,7 +142,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.home", isPad = true, tarSdkVersion = 34) +@HookBase(targetPackage = "com.miui.home", isPad = true, targetSdk = 34) public class HomeU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeV.java index c935199725..7d03703c63 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Pad/HomeV.java @@ -141,7 +141,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.home", isPad = true, tarSdkVersion = 35) +@HookBase(targetPackage = "com.miui.home", isPad = true, targetSdk = 35) public class HomeV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java index 3ae01b10d7..fa0d95dd03 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java @@ -136,7 +136,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.home", isPad = false, tarSdkVersion = 33) +@HookBase(targetPackage = "com.miui.home", isPad = false, targetSdk = 33) public class HomeT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeU.java index 30bc26f6df..ad660e098d 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeU.java @@ -139,7 +139,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.home", isPad = false, tarSdkVersion = 34) +@HookBase(targetPackage = "com.miui.home", isPad = false, targetSdk = 34) public class HomeU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeV.java index 1fdc876ba8..356302cb8d 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeV.java @@ -90,7 +90,6 @@ import com.sevtinge.hyperceiler.module.hook.home.other.ShowAllHideApp; import com.sevtinge.hyperceiler.module.hook.home.recent.AlwaysShowCleanUp; import com.sevtinge.hyperceiler.module.hook.home.recent.BackgroundBlur; -import com.sevtinge.hyperceiler.module.hook.home.recent.BlurLevel; import com.sevtinge.hyperceiler.module.hook.home.recent.CardTextColor; import com.sevtinge.hyperceiler.module.hook.home.recent.CardTextSize; import com.sevtinge.hyperceiler.module.hook.home.recent.DisableRecentViewWallpaperDarken; @@ -136,7 +135,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.home", isPad = false, tarSdkVersion = 35) +@HookBase(targetPackage = "com.miui.home", isPad = false, targetSdk = 35) public class HomeV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/HtmlViewer.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/HtmlViewer.java index 88b6289995..7caa654243 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/HtmlViewer.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/HtmlViewer.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.htmlviewer.DisableUpdateCloudAllData; -@HookBase(pkg = "com.android.htmlviewer", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.htmlviewer", isPad = false) public class HtmlViewer extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Huanji.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Huanji.java index c505303fa5..9a8295925c 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Huanji.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Huanji.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.huanji.AllowMoveAllApps; -@HookBase(pkg = "com.miui.huanji", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.huanji", isPad = false) public class Huanji extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/InCallUi.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/InCallUi.java index b631fd12d5..2bd1de9df2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/InCallUi.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/InCallUi.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.incallui.AnswerInHeadUp; import com.sevtinge.hyperceiler.module.hook.incallui.HideCrbt; -@HookBase(pkg = "com.android.incallui", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.incallui", isPad = false) public class InCallUi extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Joyose.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Joyose.java index 2222c39110..dc20bbf602 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Joyose.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Joyose.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.joyose.DisableCloudControl; import com.sevtinge.hyperceiler.module.hook.joyose.EnableGpuTuner; -@HookBase(pkg = "com.xiaomi.joyose", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.joyose", isPad = false) public class Joyose extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lbe.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lbe.java index 5fa4bf6c76..55d31ed7b4 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lbe.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lbe.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.lbe.AutoStart; import com.sevtinge.hyperceiler.module.hook.lbe.DisableClipboardTip; -@HookBase(pkg = "com.lbe.security.miui", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.lbe.security.miui", isPad = false) public class Lbe extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lpa.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lpa.java index 16d1a4b6ca..8764acd7f9 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lpa.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Lpa.java @@ -25,7 +25,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.euicc", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.euicc", isPad = false) public class Lpa extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MediaEditor.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MediaEditor.java index 60b7eb49d7..3cc33b00a6 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MediaEditor.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MediaEditor.java @@ -30,7 +30,7 @@ import java.util.Objects; -@HookBase(pkg = "com.miui.mediaeditor", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.mediaeditor", isPad = false) public class MediaEditor extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiCloudService.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiCloudService.java index fc10f75f9c..c989e55788 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiCloudService.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiCloudService.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.cloudservice.CloudList; -@HookBase(pkg = "com.miui.cloudservice", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.cloudservice", isPad = false) public class MiCloudService extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiLink.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiLink.java index 55299a2d39..e7c5d15710 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiLink.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiLink.java @@ -25,7 +25,7 @@ import com.sevtinge.hyperceiler.module.hook.milink.NewUnlockHMind; import com.sevtinge.hyperceiler.module.hook.milink.UnlockMiShare; -@HookBase(pkg = "com.milink.service", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.milink.service", isPad = false) public class MiLink extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSettings.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSettings.java index 87b2e98aa1..9349c68abc 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSettings.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSettings.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.misettings.CustomRefreshRate; import com.sevtinge.hyperceiler.module.hook.misettings.ShowMoreFpsList; -@HookBase(pkg = "com.xiaomi.misettings", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.misettings", isPad = false) public class MiSettings extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiShare.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiShare.java index bbb0bd92cd..669ddada9f 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiShare.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiShare.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.mishare.NoAutoTurnOff; import com.sevtinge.hyperceiler.module.hook.mishare.UnlockTurboMode; -@HookBase(pkg = "com.miui.mishare.connectivity", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.mishare.connectivity", isPad = false) public class MiShare extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSound.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSound.java index 6586ab8403..20ba3581e0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSound.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiSound.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.misound.BluetoothListener; import com.sevtinge.hyperceiler.module.hook.misound.IncreaseSamplingRate; -@HookBase(pkg = "com.miui.misound", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.misound", isPad = false) public class MiSound extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiWallpaper.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiWallpaper.java index e018a22850..73a2b38bae 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiWallpaper.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/MiWallpaper.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.miwallpaper.UnlockSuperWallpaper; -@HookBase(pkg = "com.miui.miwallpaper", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.miwallpaper", isPad = false) public class MiWallpaper extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mms.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mms.java index 551dc66a9b..749c5594cc 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mms.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mms.java @@ -24,7 +24,7 @@ import com.sevtinge.hyperceiler.module.hook.mms.DisableRiskTip; import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard; -@HookBase(pkg = "com.android.mms", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.mms", isPad = false) public class Mms extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mtb.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mtb.java index b7a016b1bd..94cb86a18a 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mtb.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Mtb.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.mtb.BypassAuthentication; import com.sevtinge.hyperceiler.module.hook.mtb.IsUserBuild; -@HookBase(pkg = "com.xiaomi.mtb", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.mtb", isPad = false) public class Mtb extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Nfc.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Nfc.java index b14f4d62a0..0d737d4d8d 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Nfc.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Nfc.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.nfc.AllowInformationScreen; import com.sevtinge.hyperceiler.module.hook.nfc.DisableSound; -@HookBase(pkg = "com.android.nfc", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.nfc", isPad = false) public class Nfc extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Notes.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Notes.java index 95960784ba..c76a7688d2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Notes.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Notes.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.notes.DisableAiWatermark; import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard; -@HookBase(pkg = "com.miui.notes", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.notes", isPad = false) public class Notes extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/PackageInstaller.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/PackageInstaller.java index 454f16d222..55ea053367 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/PackageInstaller.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/PackageInstaller.java @@ -32,7 +32,7 @@ import com.sevtinge.hyperceiler.module.hook.packageinstaller.InstallRiskDisable; import com.sevtinge.hyperceiler.module.hook.packageinstaller.InstallSource; -@HookBase(pkg = "com.miui.packageinstaller", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.packageinstaller", isPad = false) public class PackageInstaller extends BaseModule { public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/PersonalAssistant.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/PersonalAssistant.java index ab0ae447e2..bc4f05cc3c 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/PersonalAssistant.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/PersonalAssistant.java @@ -29,7 +29,7 @@ import com.sevtinge.hyperceiler.module.hook.personalassistant.SetTravelNotificationStatusBarInfoMaxWidth; import com.sevtinge.hyperceiler.module.hook.personalassistant.UnlockWidgetCountLimit; -@HookBase(pkg = "com.miui.personalassistant", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.personalassistant", isPad = false) public class PersonalAssistant extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Phone.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Phone.java index 31c9cb9787..3daf45259a 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Phone.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Phone.java @@ -29,7 +29,7 @@ import com.sevtinge.hyperceiler.module.hook.phone.N5N8BandPhone; import com.sevtinge.hyperceiler.module.hook.phone.ViceSlotVolteButton; -@HookBase(pkg = "com.android.phone", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.phone", isPad = false) public class Phone extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/PowerKeeper.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/PowerKeeper.java index 3a835b3225..4ff88498d2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/PowerKeeper.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/PowerKeeper.java @@ -27,7 +27,7 @@ import com.sevtinge.hyperceiler.module.hook.powerkeeper.LockMaxFps; import com.sevtinge.hyperceiler.module.hook.powerkeeper.PreventBatteryWitelist; -@HookBase(pkg = "com.miui.powerkeeper", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.powerkeeper", isPad = false) public class PowerKeeper extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/RemoteController.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/RemoteController.java index 9a674af09c..91cb400f23 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/RemoteController.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/RemoteController.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.remotecontroller.DisableAd; -@HookBase(pkg = "com.duokan.phone.remotecontroller", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.duokan.phone.remotecontroller", isPad = false) public class RemoteController extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Scanner.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Scanner.java index 682007651d..a7c7ff236c 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Scanner.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Scanner.java @@ -28,7 +28,7 @@ import com.sevtinge.hyperceiler.module.hook.scanner.document.EnableExcel; import com.sevtinge.hyperceiler.module.hook.scanner.document.EnablePpt; -@HookBase(pkg = "com.xiaomi.scanner", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.scanner", isPad = false) public class Scanner extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenRecorder.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenRecorder.java index 63c9ce6993..3f95705fde 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenRecorder.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenRecorder.java @@ -25,7 +25,7 @@ import com.sevtinge.hyperceiler.module.hook.screenrecorder.ScreenRecorderConfig; import com.sevtinge.hyperceiler.module.hook.screenrecorder.UnlockMoreVolumeFromNew; -@HookBase(pkg = "com.miui.screenrecorder", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.screenrecorder", isPad = false) public class ScreenRecorder extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenShot.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenShot.java index 8f28f14452..ac5a87f362 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenShot.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ScreenShot.java @@ -28,7 +28,7 @@ import com.sevtinge.hyperceiler.module.hook.screenshot.UnlockPrivacyMarking; import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard; -@HookBase(pkg = "com.miui.screenshot", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.screenshot", isPad = false) public class ScreenShot extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityAdd.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityAdd.java index 27bdc8a258..add0026268 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityAdd.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityAdd.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.securityadd.DisableGameBoosterAds; -@HookBase(pkg = "com.miui.securityadd", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.securityadd", isPad = false) public class SecurityAdd extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterT.java index 48b07325ac..8cc9cf333a 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterT.java @@ -73,7 +73,7 @@ import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VBVideoMode; import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VideoDolbyOpen; -@HookBase(pkg = "com.miui.securitycenter", isPad = true, tarSdkVersion = 33) +@HookBase(targetPackage = "com.miui.securitycenter", isPad = true, targetSdk = 33) public class SecurityCenterT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterU.java index dfb7624857..708178d2f0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterU.java @@ -74,7 +74,7 @@ import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VBVideoMode; import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VideoDolbyOpen; -@HookBase(pkg = "com.miui.securitycenter", isPad = true, tarSdkVersion = 34) +@HookBase(targetPackage = "com.miui.securitycenter", isPad = true, targetSdk = 34) public class SecurityCenterU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterV.java index 16ddafb369..d9f8539ba0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Pad/SecurityCenterV.java @@ -74,7 +74,7 @@ import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VBVideoMode; import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VideoDolbyOpen; -@HookBase(pkg = "com.miui.securitycenter", isPad = true, tarSdkVersion = 35) +@HookBase(targetPackage = "com.miui.securitycenter", isPad = true, targetSdk = 35) public class SecurityCenterV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterT.java index 71d7d06f20..2e8a2649cb 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterT.java @@ -73,7 +73,7 @@ import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VBVideoMode; import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VideoDolbyOpen; -@HookBase(pkg = "com.miui.securitycenter", isPad = false, tarSdkVersion = 33) +@HookBase(targetPackage = "com.miui.securitycenter", isPad = false, targetSdk = 33) public class SecurityCenterT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterU.java index 9d1688b1a1..06f681deb5 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterU.java @@ -74,7 +74,7 @@ import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VBVideoMode; import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VideoDolbyOpen; -@HookBase(pkg = "com.miui.securitycenter", isPad = false, tarSdkVersion = 34) +@HookBase(targetPackage = "com.miui.securitycenter", isPad = false, targetSdk = 34) public class SecurityCenterU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterV.java index 667f4317da..8dc1660539 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/Phone/SecurityCenterV.java @@ -74,7 +74,7 @@ import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VBVideoMode; import com.sevtinge.hyperceiler.module.hook.securitycenter.sidebar.video.VideoDolbyOpen; -@HookBase(pkg = "com.miui.securitycenter", isPad = false, tarSdkVersion = 35) +@HookBase(targetPackage = "com.miui.securitycenter", isPad = false, targetSdk = 35) public class SecurityCenterV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkT.java index dc86f63251..5f8bce65dd 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkT.java @@ -41,7 +41,6 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.DisablePinVerifyPer72h; import com.sevtinge.hyperceiler.module.hook.systemframework.DisableVerifyCanBeDisabled; import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure; -import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.FreeformBubble; import com.sevtinge.hyperceiler.module.hook.systemframework.HookEntry; import com.sevtinge.hyperceiler.module.hook.systemframework.LinkTurboToast; @@ -70,6 +69,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.display.ThemeProvider; import com.sevtinge.hyperceiler.module.hook.systemframework.display.ToastTime; import com.sevtinge.hyperceiler.module.hook.systemframework.display.UseAOSPScreenShot; +import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.OpenAppInFreeForm; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.UnForegroundPin; import com.sevtinge.hyperceiler.module.hook.systemframework.mipad.IgnoreStylusKeyGesture; @@ -84,7 +84,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.network.N5N8Band; import com.sevtinge.hyperceiler.module.hook.various.NoAccessDeviceLogsRequest; -@HookBase(pkg = "android", isPad = true, tarSdkVersion = 33) +@HookBase(targetPackage = "android", isPad = true, targetSdk = 33) public class SystemFrameworkT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkU.java index 16f73723ee..65f50d1e91 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkU.java @@ -44,7 +44,6 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.DisablePinVerifyPer72h; import com.sevtinge.hyperceiler.module.hook.systemframework.DisableVerifyCanBeDisabled; import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure; -import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.FreeformBubble; import com.sevtinge.hyperceiler.module.hook.systemframework.HookEntry; import com.sevtinge.hyperceiler.module.hook.systemframework.LinkTurboToast; @@ -73,6 +72,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.display.ThemeProvider; import com.sevtinge.hyperceiler.module.hook.systemframework.display.ToastTime; import com.sevtinge.hyperceiler.module.hook.systemframework.display.UseAOSPScreenShot; +import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.OpenAppInFreeForm; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.UnForegroundPin; import com.sevtinge.hyperceiler.module.hook.systemframework.mipad.IgnoreStylusKeyGesture; @@ -87,7 +87,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.network.N5N8Band; import com.sevtinge.hyperceiler.module.hook.various.NoAccessDeviceLogsRequest; -@HookBase(pkg = "android", isPad = true, tarSdkVersion = 34) +@HookBase(targetPackage = "android", isPad = true, targetSdk = 34) public class SystemFrameworkU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkV.java index 6f810956c9..90e1f24ee1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Pad/SystemFrameworkV.java @@ -44,7 +44,6 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.DisablePinVerifyPer72h; import com.sevtinge.hyperceiler.module.hook.systemframework.DisableVerifyCanBeDisabled; import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure; -import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.FreeformBubble; import com.sevtinge.hyperceiler.module.hook.systemframework.HookEntry; import com.sevtinge.hyperceiler.module.hook.systemframework.LinkTurboToast; @@ -75,6 +74,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.display.ThemeProvider; import com.sevtinge.hyperceiler.module.hook.systemframework.display.ToastTime; import com.sevtinge.hyperceiler.module.hook.systemframework.display.UseAOSPScreenShot; +import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.OpenAppInFreeForm; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.UnForegroundPin; import com.sevtinge.hyperceiler.module.hook.systemframework.mipad.IgnoreStylusKeyGesture; @@ -89,7 +89,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.network.N5N8Band; import com.sevtinge.hyperceiler.module.hook.various.NoAccessDeviceLogsRequest; -@HookBase(pkg = "android", isPad = true, tarSdkVersion = 35) +@HookBase(targetPackage = "android", isPad = true, targetSdk = 35) public class SystemFrameworkV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkT.java index 899fae75c9..e2358dca27 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkT.java @@ -41,7 +41,6 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.DisablePinVerifyPer72h; import com.sevtinge.hyperceiler.module.hook.systemframework.DisableVerifyCanBeDisabled; import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure; -import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.FreeformBubble; import com.sevtinge.hyperceiler.module.hook.systemframework.HookEntry; import com.sevtinge.hyperceiler.module.hook.systemframework.LinkTurboToast; @@ -70,6 +69,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.display.ThemeProvider; import com.sevtinge.hyperceiler.module.hook.systemframework.display.ToastTime; import com.sevtinge.hyperceiler.module.hook.systemframework.display.UseAOSPScreenShot; +import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.OpenAppInFreeForm; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.UnForegroundPin; import com.sevtinge.hyperceiler.module.hook.systemframework.network.DualNRSupport; @@ -79,7 +79,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.network.N5N8Band; import com.sevtinge.hyperceiler.module.hook.various.NoAccessDeviceLogsRequest; -@HookBase(pkg = "android", isPad = false, tarSdkVersion = 33) +@HookBase(targetPackage = "android", isPad = false, targetSdk = 33) public class SystemFrameworkT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkU.java index 7ae0f4fdba..a832456c29 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkU.java @@ -44,7 +44,6 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.DisablePinVerifyPer72h; import com.sevtinge.hyperceiler.module.hook.systemframework.DisableVerifyCanBeDisabled; import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure; -import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.FreeformBubble; import com.sevtinge.hyperceiler.module.hook.systemframework.HookEntry; import com.sevtinge.hyperceiler.module.hook.systemframework.LinkTurboToast; @@ -73,6 +72,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.display.ThemeProvider; import com.sevtinge.hyperceiler.module.hook.systemframework.display.ToastTime; import com.sevtinge.hyperceiler.module.hook.systemframework.display.UseAOSPScreenShot; +import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.OpenAppInFreeForm; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.UnForegroundPin; import com.sevtinge.hyperceiler.module.hook.systemframework.network.DualNRSupport; @@ -82,7 +82,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.network.N5N8Band; import com.sevtinge.hyperceiler.module.hook.various.NoAccessDeviceLogsRequest; -@HookBase(pkg = "android", isPad = false, tarSdkVersion = 34) +@HookBase(targetPackage = "android", isPad = false, targetSdk = 34) public class SystemFrameworkU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkV.java index b1bf9018a8..300606e918 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFramework/Phone/SystemFrameworkV.java @@ -44,7 +44,6 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.DisablePinVerifyPer72h; import com.sevtinge.hyperceiler.module.hook.systemframework.DisableVerifyCanBeDisabled; import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure; -import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.FreeformBubble; import com.sevtinge.hyperceiler.module.hook.systemframework.HookEntry; import com.sevtinge.hyperceiler.module.hook.systemframework.LinkTurboToast; @@ -75,6 +74,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.display.ThemeProvider; import com.sevtinge.hyperceiler.module.hook.systemframework.display.ToastTime; import com.sevtinge.hyperceiler.module.hook.systemframework.display.UseAOSPScreenShot; +import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.FreeFormCount; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.OpenAppInFreeForm; import com.sevtinge.hyperceiler.module.hook.systemframework.freeform.UnForegroundPin; import com.sevtinge.hyperceiler.module.hook.systemframework.network.DualNRSupport; @@ -84,7 +84,7 @@ import com.sevtinge.hyperceiler.module.hook.systemframework.network.N5N8Band; import com.sevtinge.hyperceiler.module.hook.various.NoAccessDeviceLogsRequest; -@HookBase(pkg = "android", isPad = false, tarSdkVersion = 35) +@HookBase(targetPackage = "android", isPad = false, targetSdk = 35) public class SystemFrameworkV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsT.java index e987009a1d..dd7f321af2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsT.java @@ -57,7 +57,7 @@ import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockMemc; import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockSuperResolution; -@HookBase(pkg = "com.android.settings", isPad = true, tarSdkVersion = 33) +@HookBase(targetPackage = "com.android.settings", isPad = true, targetSdk = 33) public class SystemSettingsT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsU.java index f5cec81acd..4d205ccd71 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsU.java @@ -57,7 +57,7 @@ import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockMemc; import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockSuperResolution; -@HookBase(pkg = "com.android.settings", isPad = true, tarSdkVersion = 34) +@HookBase(targetPackage = "com.android.settings", isPad = true, targetSdk = 34) public class SystemSettingsU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsV.java index 9a0ba6b74f..4cf76a367f 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Pad/SystemSettingsV.java @@ -57,7 +57,7 @@ import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockMemc; import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockSuperResolution; -@HookBase(pkg = "com.android.settings", isPad = true, tarSdkVersion = 35) +@HookBase(targetPackage = "com.android.settings", isPad = true, targetSdk = 35) public class SystemSettingsV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsT.java index 7d05147c4c..23b50a8c41 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsT.java @@ -57,7 +57,7 @@ import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockMemc; import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockSuperResolution; -@HookBase(pkg = "com.android.settings", isPad = false, tarSdkVersion = 33) +@HookBase(targetPackage = "com.android.settings", isPad = false, targetSdk = 33) public class SystemSettingsT extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsU.java index 47b4cb65fb..58882695a7 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsU.java @@ -57,7 +57,7 @@ import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockMemc; import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockSuperResolution; -@HookBase(pkg = "com.android.settings", isPad = false, tarSdkVersion = 34) +@HookBase(targetPackage = "com.android.settings", isPad = false, targetSdk = 34) public class SystemSettingsU extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsV.java index fb8a06f431..cbfb562c21 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemSettings/Phone/SystemSettingsV.java @@ -58,7 +58,7 @@ import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockMemc; import com.sevtinge.hyperceiler.module.hook.systemsettings.aiimage.UnlockSuperResolution; -@HookBase(pkg = "com.android.settings", isPad = false, tarSdkVersion = 35) +@HookBase(targetPackage = "com.android.settings", isPad = false, targetSdk = 35) public class SystemSettingsV extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiT.java index 279e0f7829..a9ad236dec 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiT.java @@ -143,7 +143,7 @@ import java.util.Objects; -@HookBase(pkg = "com.android.systemui", isPad = true, tarSdkVersion = 33) +@HookBase(targetPackage = "com.android.systemui", isPad = true, targetSdk = 33) public class SystemUiT extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiU.java index 2c7c13e4d8..356f156b0e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiU.java @@ -141,7 +141,7 @@ import java.util.Objects; -@HookBase(pkg = "com.android.systemui", isPad = true, tarSdkVersion = 34) +@HookBase(targetPackage = "com.android.systemui", isPad = true, targetSdk = 34) public class SystemUiU extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiV.java index d6210d7f64..cd1520cbed 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Pad/SystemUiV.java @@ -59,6 +59,7 @@ import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MediaControlPanelTimeViewTextSize; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MediaSeekBarColor; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MuteVisibleNotifications; +import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NewFlashLight; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NotificationImportanceHyperOSFix; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NotificationRowMenu; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NotificationWeather; @@ -76,7 +77,6 @@ import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.SunlightModeHigh; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.SwitchCCAndNotification; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.TaplusTile; -import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NewFlashLight; import com.sevtinge.hyperceiler.module.hook.systemui.lockscreen.AllowThirdLockScreenUseFace; import com.sevtinge.hyperceiler.module.hook.systemui.lockscreen.BlurButton; import com.sevtinge.hyperceiler.module.hook.systemui.lockscreen.ChargingCVP; @@ -113,24 +113,15 @@ import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.all.HideVoWiFiIcon; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.all.IconsFromSystemManager; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.all.StatusBarIcon; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.all.StatusBarIconPositionAdjust; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.all.WifiNetworkIndicator; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.v.FocusNotifLyric; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.layout.StatusBarLayout; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.DualRowSignalHook; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileNetwork; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobilePublicHook; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileTypeSingleHook; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileTypeTextCustom; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.network.NetworkSpeedSec; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.network.NetworkSpeedSpacing; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.network.news.NewNetworkSpeed; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.network.news.NewNetworkSpeedStyle; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.strongtoast.HideStrongToast; -import java.util.Objects; - -@HookBase(pkg = "com.android.systemui", isPad = true, tarSdkVersion = 35) +@HookBase(targetPackage = "com.android.systemui", isPad = true, targetSdk = 35) public class SystemUiV extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiT.java index aecd25aa8a..c9060f2d72 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiT.java @@ -143,7 +143,7 @@ import java.util.Objects; -@HookBase(pkg = "com.android.systemui", isPad = false, tarSdkVersion = 33) +@HookBase(targetPackage = "com.android.systemui", isPad = false, targetSdk = 33) public class SystemUiT extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiU.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiU.java index edb77f9648..85bf19d942 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiU.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiU.java @@ -141,7 +141,7 @@ import java.util.Objects; -@HookBase(pkg = "com.android.systemui", isPad = false, tarSdkVersion = 34) +@HookBase(targetPackage = "com.android.systemui", isPad = false, targetSdk = 34) public class SystemUiU extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiV.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiV.java index d87e1547b8..56cf43801a 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiV.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI/Phone/SystemUiV.java @@ -59,6 +59,7 @@ import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MediaControlPanelTimeViewTextSize; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MediaSeekBarColor; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MuteVisibleNotifications; +import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NewFlashLight; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NotificationImportanceHyperOSFix; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NotificationRowMenu; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NotificationWeather; @@ -67,15 +68,14 @@ import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.QQSGrid; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.QSColor; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.QSControlDetailBackgroundAlpha; -import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.ReduceBrightColorsTile; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.QSGrid; +import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.ReduceBrightColorsTile; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.RemoveNotifNumLimit; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.ShadeHeaderGradientBlur; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.SunlightMode; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.SunlightModeHigh; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.SwitchCCAndNotification; import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.TaplusTile; -import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NewFlashLight; import com.sevtinge.hyperceiler.module.hook.systemui.lockscreen.AllowThirdLockScreenUseFace; import com.sevtinge.hyperceiler.module.hook.systemui.lockscreen.BlurButton; import com.sevtinge.hyperceiler.module.hook.systemui.lockscreen.ChargingCVP; @@ -115,9 +115,9 @@ import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.v.FocusNotifLyric; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.icon.v.HideFakeStatusBar; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.DualRowSignalHookV; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileTypeTextCustom; -import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileTypeSingle2Hook; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobilePublicHookV; +import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileTypeSingle2Hook; +import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileTypeTextCustom; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.network.NetworkSpeedSec; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.network.NetworkSpeedSpacing; import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.network.news.NewNetworkSpeed; @@ -126,7 +126,7 @@ import java.util.Objects; -@HookBase(pkg = "com.android.systemui", isPad = false, tarSdkVersion = 35) +@HookBase(targetPackage = "com.android.systemui", isPad = false, targetSdk = 35) public class SystemUiV extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java index 022f32c60e..153cc24486 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.telecom.ScamReminderBypass; -@HookBase(pkg = "com.android.server.telecom", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.server.telecom", isPad = false) public class Telecom extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ThemeManager.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ThemeManager.java index 0e0ab1f54b..cb3bd79c02 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/ThemeManager.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/ThemeManager.java @@ -27,7 +27,7 @@ import com.sevtinge.hyperceiler.module.hook.thememanager.EnablePadTheme; import com.sevtinge.hyperceiler.module.hook.thememanager.VersionCodeModify; -@HookBase(pkg = "com.android.thememanager", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.thememanager", isPad = false) public class ThemeManager extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/TrustService.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/TrustService.java index 8c68de5555..8114514e8b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/TrustService.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/TrustService.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.trustservice.DisableMrm; -@HookBase(pkg = "com.xiaomi.trustservice", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.xiaomi.trustservice", isPad = false) public class TrustService extends BaseModule { @Override public void handleLoadPackage() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/TsmClient.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/TsmClient.java index bd660340cf..abeb3e9ea8 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/TsmClient.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/TsmClient.java @@ -22,7 +22,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.tsmclient.AutoNfc; -@HookBase(pkg = "com.miui.tsmclient", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.tsmclient", isPad = false) public class TsmClient extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java index 2e6bdd0039..9d8b090edc 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java @@ -29,7 +29,7 @@ import com.sevtinge.hyperceiler.module.hook.updater.VersionCodeModify; import com.sevtinge.hyperceiler.module.hook.updater.VersionCodeNew; -@HookBase(pkg = "com.android.updater", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.android.updater", isPad = false) public class Updater extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousSystemApps.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousSystemApps.java index ea4e13e177..b05adcff14 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousSystemApps.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousSystemApps.java @@ -27,7 +27,7 @@ import java.util.Arrays; import java.util.HashSet; -@HookBase(pkg = "VariousSystemApps", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "VariousSystemApps", isPad = false) public class VariousSystemApps extends BaseModule { Class mHelpers; String mPackageName; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousThirdApps.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousThirdApps.java index 8c9ec6bbc0..12d78704ab 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousThirdApps.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VariousThirdApps.java @@ -21,6 +21,7 @@ import android.content.Context; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; + import com.hchen.database.HookBase; import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.base.tool.OtherTool; @@ -35,7 +36,7 @@ import java.util.ArrayList; import java.util.List; -@HookBase(pkg = "VariousThirdApps", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "VariousThirdApps", isPad = false) public class VariousThirdApps extends BaseModule { String mPackageName; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceAssist.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceAssist.java index 16cb3ea6e9..aaf0646889 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceAssist.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceAssist.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.voiceassist.DisableChatWatermark; import com.sevtinge.hyperceiler.module.hook.voiceassist.UseThirdPartyBrowser; -@HookBase(pkg = "com.miui.voiceassist", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.voiceassist", isPad = false) public class VoiceAssist extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceTrigger.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceTrigger.java index 449724d9e4..5c51a7f5bc 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceTrigger.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/VoiceTrigger.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.base.BaseModule; import com.sevtinge.hyperceiler.module.hook.voicetrigger.BypassUDKWordLegalCheck; -@HookBase(pkg = "com.miui.voicetrigger", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.voicetrigger", isPad = false) public class VoiceTrigger extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Weather.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Weather.java index 4540bf9a59..78fa36e8a1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Weather.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Weather.java @@ -23,7 +23,7 @@ import com.sevtinge.hyperceiler.module.hook.weather.SetCardLightDarkMode; import com.sevtinge.hyperceiler.module.hook.weather.SetDeviceLevel; -@HookBase(pkg = "com.miui.weather2", skip = true, isPad = false, tarSdkVersion = 0) +@HookBase(targetPackage = "com.miui.weather2", isPad = false) public class Weather extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java index 54f493bf9c..3634070e4b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java @@ -20,6 +20,7 @@ import static com.sevtinge.hyperceiler.utils.log.LogManager.logLevel; +import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.tool.HookTool; import com.sevtinge.hyperceiler.module.base.tool.ResourcesTool; @@ -30,7 +31,7 @@ public abstract class BaseHook extends HookTool { public String TAG = getClass().getSimpleName(); - public static final ResourcesTool mResHook = BaseXposedInit.mResHook; + public static final ResourcesTool mResHook = XposedInit.mResHook; // public static final XmlTool mXmlTool = BaseXposedInit.mXmlTool; public static final String ACTION_PREFIX = "com.sevtinge.hyperceiler.module.action."; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseModule.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseModule.java index 1026fd9624..173a6942b3 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseModule.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseModule.java @@ -28,18 +28,23 @@ import com.sevtinge.hyperceiler.utils.api.ProjectApi; import com.sevtinge.hyperceiler.utils.log.XposedLogUtils; import com.sevtinge.hyperceiler.utils.prefs.PrefsMap; +import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils; import java.util.HashMap; import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; -public abstract class BaseModule implements IXposedHook { - +public abstract class BaseModule { public LoadPackageParam mLoadPackageParam = null; public String TAG = getClass().getSimpleName(); - public final PrefsMap mPrefsMap = XposedInit.mPrefsMap; + public final PrefsMap mPrefsMap = PrefsUtils.mPrefsMap; private static HashMap swappedMap = CrashData.swappedData(); + public abstract void handleLoadPackage(); + + public void initZygote() { + } + public void init(LoadPackageParam lpparam) { if (swappedMap.isEmpty()) { swappedMap = CrashData.swappedData(); @@ -55,7 +60,7 @@ public void init(LoadPackageParam lpparam) { if (!ProjectApi.mAppModulePkg.equals(lpparam.packageName)) { ContextUtils.getWaitContext(context -> { if (context != null) { - BaseXposedInit.mResHook.loadModuleRes(context); + XposedInit.mResHook.loadModuleRes(context); } }, "android".equals(lpparam.packageName)); } @@ -74,10 +79,6 @@ public void init(LoadPackageParam lpparam) { } } - @Override - public void initZygote() { - } - /*public void initHook(BaseHook baseHook) { if (baseHook.isLoad()) { baseHook.onCreate(mLoadPackageParam); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseXposedInit.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseXposedInit.java deleted file mode 100644 index aca89d44f7..0000000000 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseXposedInit.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * This file is part of HyperCeiler. - - * HyperCeiler is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - - * Copyright (C) 2023-2024 HyperCeiler Contributions - */ -package com.sevtinge.hyperceiler.module.base; - -import static com.sevtinge.hyperceiler.utils.Helpers.getPackageVersionCode; -import static com.sevtinge.hyperceiler.utils.Helpers.getPackageVersionName; -import static com.sevtinge.hyperceiler.utils.devicesdk.MiDeviceAppUtilsKt.isPad; -import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.getAndroidVersion; -import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.getHyperOSVersion; -import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.getMiuiVersion; -import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isAndroidVersion; -import static com.sevtinge.hyperceiler.utils.log.LogManager.logLevelDesc; -import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logD; -import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logE; -import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logI; - -import android.os.Process; - -import androidx.annotation.CallSuper; - -import com.sevtinge.hyperceiler.module.app.VariousSystemApps; -import com.sevtinge.hyperceiler.module.app.VariousThirdApps; -import com.sevtinge.hyperceiler.module.base.tool.ResourcesTool; -import com.sevtinge.hyperceiler.safe.CrashHook; -import com.sevtinge.hyperceiler.utils.api.ProjectApi; -import com.sevtinge.hyperceiler.utils.prefs.PrefsMap; -import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils; - -import java.io.File; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import de.robv.android.xposed.IXposedHookZygoteInit; -import de.robv.android.xposed.XSharedPreferences; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; - -public abstract class BaseXposedInit { - private static final String TAG = "BaseXposedInit"; - public static boolean isSafeModeOn = false; - public static String mModulePath = null; - public static PrefsMap mPrefsMap = new PrefsMap<>(); - public static ResourcesTool mResHook; - // public static XmlTool mXmlTool; - public final VariousThirdApps mVariousThirdApps = new VariousThirdApps(); - public final VariousSystemApps mVariousSystemApps = new VariousSystemApps(); - private MultiValueMap dataMap = null; - - @CallSuper - public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable { - setXSharedPrefs(); - mResHook = new ResourcesTool(startupParam.modulePath); - // mXmlTool = new XmlTool(startupParam); - mModulePath = startupParam.modulePath; - } - - private void setXSharedPrefs() { - if (mPrefsMap.isEmpty()) { - XSharedPreferences mXSharedPreferences; - try { - mXSharedPreferences = new XSharedPreferences(ProjectApi.mAppModulePkg, PrefsUtils.mPrefsName); - mXSharedPreferences.makeWorldReadable(); - Map allPrefs = mXSharedPreferences.getAll(); - - if (allPrefs != null && !allPrefs.isEmpty()) { - mPrefsMap.putAll(allPrefs); - } else { - mXSharedPreferences = new XSharedPreferences(new File(PrefsUtils.mPrefsFile)); - mXSharedPreferences.makeWorldReadable(); - allPrefs = mXSharedPreferences.getAll(); - - if (allPrefs != null && !allPrefs.isEmpty()) { - mPrefsMap.putAll(allPrefs); - } else { - logE("[UID" + Process.myUid() + "]", "Cannot read SharedPreferences, some mods might not work!"); - } - } - } catch (Throwable t) { - logE("setXSharedPrefs", t); - } - } - } - - public void init(LoadPackageParam lpparam) { - if (isSafeModeOn) return; - initLog(lpparam); - invokeInit(lpparam); - androidCrash(lpparam); - } - - - private void invokeInit(LoadPackageParam lpparam) { - if (dataMap == null) { - dataMap = DataBase.get(); - } - - String mPkgName = lpparam.packageName; - if (mPkgName == null) return; - - if (ProjectApi.mAppModulePkg.equals(mPkgName)) { - ModuleActiveHook(lpparam); - return; - } - - if (isInSafeMode(mPkgName) || isOtherRestrictions(mPkgName)) return; - - List helperList = dataMap.get(mPkgName); - if (helperList.isEmpty()) { - mVariousThirdApps.init(lpparam); - return; - } - - for (DataBase.DataHelper helper : helperList) { - ClassLoader classLoader = getClass().getClassLoader(); - if (classLoader == null) return; - - try { - Class clazz = classLoader.loadClass(helper.fullName); - boolean isPad = helper.isPad; - int android = helper.android; - boolean skip = helper.skip; - - if (skip || (isAndroidVersion(android) && isPad == isPad())) { - invoke(lpparam, clazz); - break; - } - } catch (ClassNotFoundException e) { - logE(TAG, e); - return; - } - } - } - - private void invoke(LoadPackageParam lpparam, Class clzz) { - logD(lpparam.packageName, "Using the configuration file " + clzz.getName()); - Object newInstance; - try { - Constructor constructor = clzz.getDeclaredConstructor(); - newInstance = constructor.newInstance(); - - Method[] methods = clzz.getMethods(); - for (Method method : methods) { - if ("init".equals(method.getName())) { - method.invoke(newInstance, lpparam); - return; - } - } - } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException e) { - throw new RuntimeException("Failed to create instance or invoke init method", e); - } - } - - private void initLog(LoadPackageParam lpparam) { - String packageName = lpparam.packageName; - if (Objects.equals(packageName, "android")) - logI(packageName, "androidVersion = " + getAndroidVersion() + ", miuiVersion = " + getMiuiVersion() + ", hyperosVersion = " + getHyperOSVersion()); - else - logI(packageName, "versionName = " + getPackageVersionName(lpparam) + ", versionCode = " + getPackageVersionCode(lpparam)); - } - - private void androidCrash(LoadPackageParam lpparam) { - if ("android".equals(lpparam.packageName)) { - XposedBridge.log("[HyperCeiler][I]: Log level is " + logLevelDesc()); - try { - new CrashHook(lpparam); - } catch (Exception e) { - logE(TAG, e); - } - } - } - - private boolean isInSafeMode(String pkg) { - switch (pkg) { - case "com.android.systemui" -> { - return isSystemUIModuleEnable(); - } - case "com.miui.home" -> { - return isHomeModuleEnable(); - } - case "com.miui.securitycenter" -> { - return isSecurityCenterModuleEnable(); - } - } - return false; - } - - private boolean isOtherRestrictions(String pkg) { - switch (pkg) { - case "com.google.android.webview", "com.miui.contentcatcher", "com.miui.catcherpatch" -> { - return true; - } - default -> { - return false; - } - } - } - - public void ModuleActiveHook(LoadPackageParam lpparam) { - Class mHelpers = XposedHelpers.findClassIfExists(ProjectApi.mAppModulePkg + ".utils.Helpers", lpparam.classLoader); - - XposedHelpers.setStaticBooleanField(mHelpers, "isModuleActive", true); - XposedHelpers.setStaticIntField(mHelpers, "XposedVersion", XposedBridge.getXposedVersion()); - XposedBridge.log("[HyperCeiler][I]: Log level is " + logLevelDesc()); - } - - - private boolean isSafeModeEnable(String key) { - return mPrefsMap.getBoolean(key); - } - - private boolean isSystemUIModuleEnable() { - return isSafeModeEnable("system_ui_safe_mode_enable"); - } - - private boolean isHomeModuleEnable() { - return isSafeModeEnable("home_safe_mode_enable"); - } - - private boolean isSecurityCenterModuleEnable() { - return isSafeModeEnable("security_center_safe_mode_enable"); - } - -} diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/IXposedHook.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/IXposedHook.java deleted file mode 100644 index f2df608586..0000000000 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/IXposedHook.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of HyperCeiler. - - * HyperCeiler is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - - * Copyright (C) 2023-2024 HyperCeiler Contributions -*/ -package com.sevtinge.hyperceiler.module.base; - -public interface IXposedHook { - - void initZygote(); - - void handleLoadPackage(); -} diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/tool/HookTool.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/tool/HookTool.java index b2ac518a5b..1896949399 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/tool/HookTool.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/base/tool/HookTool.java @@ -18,9 +18,9 @@ */ package com.sevtinge.hyperceiler.module.base.tool; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.utils.log.XposedLogUtils; import com.sevtinge.hyperceiler.utils.prefs.PrefsMap; +import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -33,7 +33,7 @@ import de.robv.android.xposed.callbacks.XC_LoadPackage; public class HookTool extends XposedLogUtils { - public static final PrefsMap mPrefsMap = XposedInit.mPrefsMap; + public static final PrefsMap mPrefsMap = PrefsUtils.mPrefsMap; private final String TAG = getClass().getSimpleName(); public XC_LoadPackage.LoadPackageParam lpparam; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java index f55cd94c5c..0fe2d2dd67 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java @@ -26,14 +26,13 @@ import androidx.annotation.NonNull; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; import de.robv.android.xposed.XposedHelpers; public class SeekPoints extends BaseHook { - public int points = XposedInit.mPrefsMap.getStringAsInt("home_other_seek_points", 0); + public int points = mPrefsMap.getStringAsInt("home_other_seek_points", 0); @Override public void init() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/dock/DockCustom.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/dock/DockCustom.java index 2ffbc33cad..666a02bb51 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/dock/DockCustom.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/dock/DockCustom.java @@ -29,7 +29,6 @@ import android.view.ViewGroup; import android.widget.FrameLayout; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; import com.sevtinge.hyperceiler.utils.blur.BlurUtils; import com.sevtinge.hyperceiler.utils.devicesdk.DisplayUtils; @@ -67,9 +66,9 @@ protected void after(MethodHookParam param) { FrameLayout mSearchBarContainer = (FrameLayout) XposedHelpers.callMethod(param.thisObject, "getSearchBarContainer"); FrameLayout mSearchEdgeLayout = (FrameLayout) mSearchBarContainer.getParent(); - int mDockHeight = DisplayUtils.dp2px(XposedInit.mPrefsMap.getInt("home_dock_bg_height", 80)); - int mDockMargin = DisplayUtils.dp2px(XposedInit.mPrefsMap.getInt("home_dock_bg_margin_horizontal", 30)); - int mDockBottomMargin = DisplayUtils.dp2px(XposedInit.mPrefsMap.getInt("home_dock_bg_margin_bottom", 30)); + int mDockHeight = DisplayUtils.dp2px(mPrefsMap.getInt("home_dock_bg_height", 80)); + int mDockMargin = DisplayUtils.dp2px(mPrefsMap.getInt("home_dock_bg_margin_horizontal", 30)); + int mDockBottomMargin = DisplayUtils.dp2px(mPrefsMap.getInt("home_dock_bg_margin_bottom", 30)); mDockView = new FrameLayout(mSearchBarContainer.getContext()); FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, mDockHeight); @@ -140,7 +139,7 @@ protected void after(MethodHookParam param) { @Override protected void before(MethodHookParam param) throws Throwable { Context context = (Context) param.args[0]; - param.setResult(DisplayUtils.dip2px(context, XposedInit.mPrefsMap.getInt("home_dock_margin_top",25))); + param.setResult(DisplayUtils.dip2px(context, mPrefsMap.getInt("home_dock_margin_top",25))); } }); @@ -148,7 +147,7 @@ protected void before(MethodHookParam param) throws Throwable { @Override protected void before(MethodHookParam param) throws Throwable { Context context = (Context) param.args[0]; - param.setResult(DisplayUtils.dip2px(context, XposedInit.mPrefsMap.getInt("home_dock_icon_margin_bottom",90))); + param.setResult(DisplayUtils.dip2px(context, mPrefsMap.getInt("home_dock_icon_margin_bottom",90))); } });*/ } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderShade.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderShade.java index 51261f987d..03efcc70c6 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderShade.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderShade.java @@ -31,7 +31,6 @@ import androidx.annotation.NonNull; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils; @@ -74,8 +73,8 @@ protected void after(MethodHookParam param) { bkg = null; } new Handler(context.getMainLooper()).post(() -> { - XposedInit.mPrefsMap.put("prefs_key_home_folder_shade", String.valueOf(opt)); - XposedInit.mPrefsMap.put("prefs_key_home_folder_shade_level", level); + mPrefsMap.put("prefs_key_home_folder_shade", String.valueOf(opt)); + mPrefsMap.put("prefs_key_home_folder_shade_level", level); folder.setBackground(bkg); }); } catch (Throwable t) { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/EnableIconMonetColor.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/EnableIconMonetColor.kt index 470ed8b076..a6a025118d 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/EnableIconMonetColor.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/EnableIconMonetColor.kt @@ -29,7 +29,7 @@ object EnableIconMonetColor : BaseHook() { val monet = "system_accent1_100" val monoColorId = Resources.getSystem().getIdentifier(monet, "color", "android") var monoColor = Resources.getSystem().getColor(monoColorId, null) - if (BaseXposedInit.mPrefsMap.getBoolean("home_other_use_edit_color")) { + if (mPrefsMap.getBoolean("home_other_use_edit_color")) { monoColor = mPrefsMap.getInt("home_other_your_color_qwq", -1) } mResHook.setObjectReplacement( diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/NotificationVolumeSeparateSlider.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/NotificationVolumeSeparateSlider.java index e90aba683a..fc612f9cbb 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/NotificationVolumeSeparateSlider.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/NotificationVolumeSeparateSlider.java @@ -21,7 +21,7 @@ import static de.robv.android.xposed.XposedHelpers.findClassIfExists; import com.sevtinge.hyperceiler.R; -import com.sevtinge.hyperceiler.module.base.BaseXposedInit; +import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.tool.HookTool; import de.robv.android.xposed.XposedHelpers; @@ -36,10 +36,10 @@ public static void initHideDeviceControlEntry(ClassLoader pluginLoader) { notifVolumeOnResId = R.drawable.ic_miui_volume_notification; notifVolumeOffResId = R.drawable.ic_miui_volume_notification_mute; - BaseXposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_content_width_expanded", R.dimen.miui_volume_content_width_expanded); - BaseXposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_ringer_layout_width_expanded", R.dimen.miui_volume_ringer_layout_width_expanded); - BaseXposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_column_width_expanded", R.dimen.miui_volume_column_width_expanded); - BaseXposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_column_margin_horizontal_expanded", R.dimen.miui_volume_column_margin_horizontal_expanded); + XposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_content_width_expanded", R.dimen.miui_volume_content_width_expanded); + XposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_ringer_layout_width_expanded", R.dimen.miui_volume_ringer_layout_width_expanded); + XposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_column_width_expanded", R.dimen.miui_volume_column_width_expanded); + XposedInit.mResHook.setResReplacement("miui.systemui.plugin", "dimen", "miui_volume_column_margin_horizontal_expanded", R.dimen.miui_volume_column_margin_horizontal_expanded); HookTool.hookAllMethods(mMiuiVolumeDialogImpl, "addColumn", new HookTool.MethodHook() { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimer.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimer.java index 566d976bde..ed5716b9a0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimer.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimer.java @@ -20,12 +20,12 @@ package com.sevtinge.hyperceiler.module.hook.systemui; import com.sevtinge.hyperceiler.R; +import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; -import com.sevtinge.hyperceiler.module.base.BaseXposedInit; public class VolumeTimer extends BaseHook { @Override public void init() throws NoSuchMethodException { - BaseXposedInit.mResHook.setResReplacement("miui.systemui.plugin", "array", "miui_volume_timer_segments", R.array.miui_volume_timer_segments); + XposedInit.mResHook.setResReplacement("miui.systemui.plugin", "array", "miui_volume_timer_segments", R.array.miui_volume_timer_segments); } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimerValuesHook.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimerValuesHook.java index 9e137f559e..3d4b87f57e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimerValuesHook.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/VolumeTimerValuesHook.java @@ -18,14 +18,9 @@ */ package com.sevtinge.hyperceiler.module.hook.systemui; -import android.content.Context; -import android.content.pm.ApplicationInfo; - import com.sevtinge.hyperceiler.R; +import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; -import com.sevtinge.hyperceiler.module.base.BaseXposedInit; - -import de.robv.android.xposed.XposedHelpers; public class VolumeTimerValuesHook extends BaseHook { @@ -104,6 +99,6 @@ protected void after(MethodHookParam param) throws Throwable { } public static void VolumeTimerValuesRes() { - BaseXposedInit.mResHook.setResReplacement("miui.systemui.plugin", "array", "miui_volume_timer_segments", R.array.miui_volume_timer_segments); + XposedInit.mResHook.setResReplacement("miui.systemui.plugin", "array", "miui_volume_timer_segments", R.array.miui_volume_timer_segments); } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/BluetoothTileStyle.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/BluetoothTileStyle.java index 815e37b55a..4f5653ab99 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/BluetoothTileStyle.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/BluetoothTileStyle.java @@ -18,7 +18,7 @@ */ package com.sevtinge.hyperceiler.module.hook.systemui.controlcenter; -import static com.sevtinge.hyperceiler.module.base.BaseXposedInit.mPrefsMap; +import static com.sevtinge.hyperceiler.module.base.tool.HookTool.mPrefsMap; import static com.sevtinge.hyperceiler.utils.devicesdk.DisplayUtils.dp2px; import android.annotation.SuppressLint; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/CCGridForHyperOS.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/CCGridForHyperOS.java index 336b9b6713..465cf2571e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/CCGridForHyperOS.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/CCGridForHyperOS.java @@ -18,7 +18,7 @@ */ package com.sevtinge.hyperceiler.module.hook.systemui.controlcenter; -import static com.sevtinge.hyperceiler.module.base.BaseXposedInit.mPrefsMap; +import static com.sevtinge.hyperceiler.utils.prefs.PrefsUtils.mPrefsMap; import android.content.Context; import android.graphics.drawable.Drawable; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSColor.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSColor.java index ea311cb776..85ae27a4ff 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSColor.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSColor.java @@ -25,8 +25,8 @@ import android.widget.LinearLayout; import android.widget.TextView; +import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; -import com.sevtinge.hyperceiler.module.base.BaseXposedInit; import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XposedHelpers; @@ -77,7 +77,7 @@ public static void pluginHook(ClassLoader classLoader) { new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) { - BaseXposedInit.mResHook.setObjectReplacement("miui.systemui.plugin", "color", "qs_icon_enabled_color", color); + XposedInit.mResHook.setObjectReplacement("miui.systemui.plugin", "color", "qs_icon_enabled_color", color); } } ); @@ -112,7 +112,7 @@ protected void afterHookedMethod(MethodHookParam param) { new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) { - BaseXposedInit.mResHook.setObjectReplacement("miui.systemui.plugin", "color", "qs_icon_enabled_color", bigColor); + XposedInit.mResHook.setObjectReplacement("miui.systemui.plugin", "color", "qs_icon_enabled_color", bigColor); } } ); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java index 7048848cd0..fd52cb8276 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java @@ -27,7 +27,6 @@ import android.view.WindowManager; import android.widget.FrameLayout; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; import com.sevtinge.hyperceiler.utils.blur.BlurUtils; import com.sevtinge.hyperceiler.utils.devicesdk.DisplayUtils; @@ -86,9 +85,9 @@ protected void after(MethodHookParam param) { mAllMethodList.add(method); } - mDialogGravity = XposedInit.mPrefsMap.getStringAsInt("various_dialog_gravity", 0); - mDialogHorizontalMargin = XposedInit.mPrefsMap.getInt("various_dialog_margin_horizontal", 0); - mDialogBottomMargin = XposedInit.mPrefsMap.getInt("various_dialog_margin_bottom", 0); + mDialogGravity = mPrefsMap.getStringAsInt("various_dialog_gravity", 0); + mDialogHorizontalMargin = mPrefsMap.getInt("various_dialog_margin_horizontal", 0); + mDialogBottomMargin = mPrefsMap.getInt("various_dialog_margin_bottom", 0); } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java index 549a7f52ae..b23fa37272 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java @@ -25,7 +25,6 @@ import android.view.View; import android.widget.FrameLayout; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; import com.sevtinge.hyperceiler.utils.blur.BlurUtils; import com.sevtinge.hyperceiler.utils.devicesdk.DisplayUtils; @@ -60,10 +59,10 @@ public void init() { AndroidLogUtils.logI(TAG, method.getName()); } - int mDialogGravity = XposedInit.mPrefsMap.getStringAsInt("various_dialog_gravity", 0); + int mDialogGravity = mPrefsMap.getStringAsInt("various_dialog_gravity", 0); - int mDialogHorizontalMargin = XposedInit.mPrefsMap.getInt("various_dialog_horizontal_margin", 0); - int mDialogBottomMargin = XposedInit.mPrefsMap.getInt("various_dialog_bottom_margin", 0); + int mDialogHorizontalMargin = mPrefsMap.getInt("various_dialog_horizontal_margin", 0); + int mDialogBottomMargin = mPrefsMap.getInt("various_dialog_bottom_margin", 0); if (oldMethodFound) { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/blur/BlurUtils.java b/app/src/main/java/com/sevtinge/hyperceiler/utils/blur/BlurUtils.java index b8edcc127d..d5f9b33579 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/blur/BlurUtils.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/blur/BlurUtils.java @@ -18,6 +18,7 @@ */ package com.sevtinge.hyperceiler.utils.blur; +import static com.sevtinge.hyperceiler.module.base.tool.HookTool.mPrefsMap; import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logW; import android.content.Context; @@ -29,7 +30,6 @@ import androidx.annotation.NonNull; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.utils.color.ColorUtilsStatic; import com.sevtinge.hyperceiler.utils.devicesdk.DisplayUtils; @@ -107,14 +107,14 @@ public void setKey(Context context, String key) { String mAlphaKey = key + "_color_alpha"; String mCornerRadiusKey = key + "_corner_radius"; - isEnable = XposedInit.mPrefsMap.getBoolean(mCustomBackgroundEnabledKey); + isEnable = mPrefsMap.getBoolean(mCustomBackgroundEnabledKey); - isBlurEnable = XposedInit.mPrefsMap.getBoolean(mBlurEnableKey); - mBlurRadius = XposedInit.mPrefsMap.getInt(mBlurRadiusKey, 60); + isBlurEnable = mPrefsMap.getBoolean(mBlurEnableKey); + mBlurRadius = mPrefsMap.getInt(mBlurRadiusKey, 60); - mColor = XposedInit.mPrefsMap.getInt(mColorKey, 2113929215); - mAlpha = XposedInit.mPrefsMap.getInt(mAlphaKey, 60); - mCornerRadius = DisplayUtils.dp2px(XposedInit.mPrefsMap.getInt(mCornerRadiusKey, 18)); + mColor = mPrefsMap.getInt(mColorKey, 2113929215); + mAlpha = mPrefsMap.getInt(mAlphaKey, 60); + mCornerRadius = DisplayUtils.dp2px(mPrefsMap.getInt(mCornerRadiusKey, 18)); } else { isEnable = false; @@ -230,10 +230,10 @@ public BlurUtils(View view, String key) { mBgAlphaKey = mKey + "_bg_alpha"; mBgColorKey = mKey + "_bg_color"; - mBlurRadius = XposedInit.mPrefsMap.getInt(mBlurRadiusKey,60); - mBgCornerRadius = DisplayUtils.dip2px(mContext, XposedInit.mPrefsMap.getInt(mBgCornerRadiusKey, 90)); - mBgAlpha = XposedInit.mPrefsMap.getInt(mBgAlphaKey,60); - mBgColor = XposedInit.mPrefsMap.getInt(mBgColorKey,-1); + mBlurRadius = mPrefsMap.getInt(mBlurRadiusKey,60); + mBgCornerRadius = DisplayUtils.dip2px(mContext, mPrefsMap.getInt(mBgCornerRadiusKey, 90)); + mBgAlpha = mPrefsMap.getInt(mBgAlphaKey,60); + mBgColor = mPrefsMap.getInt(mBgColorKey,-1); } setBlur(mView); } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/log/LogManager.java b/app/src/main/java/com/sevtinge/hyperceiler/utils/log/LogManager.java index e5de8fc8c0..055b06ca7e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/log/LogManager.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/log/LogManager.java @@ -20,12 +20,12 @@ import static com.sevtinge.hyperceiler.utils.devicesdk.DeviceSDKKt.getSerial; +import static com.sevtinge.hyperceiler.utils.prefs.PrefsUtils.mPrefsMap; import static com.sevtinge.hyperceiler.utils.shell.ShellUtils.safeExecCommandWithRoot; import android.util.Log; import com.sevtinge.hyperceiler.BuildConfig; -import com.sevtinge.hyperceiler.module.base.BaseXposedInit; import java.io.BufferedReader; import java.io.InputStreamReader; @@ -44,7 +44,7 @@ public class LogManager { public static String LOGGER_CHECKER_ERR_CODE; public static int getLogLevel() { - int level = BaseXposedInit.mPrefsMap.getStringAsInt("log_level", 3); + int level = mPrefsMap.getStringAsInt("log_level", 3); return BuildConfig.BUILD_TYPE.equals("canary") ? (level != 3 && level != 4 ? 3 : level) : level; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsChangeObserver.java b/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsChangeObserver.java index 8846eef49d..24d473dae8 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsChangeObserver.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsChangeObserver.java @@ -23,13 +23,13 @@ import static com.sevtinge.hyperceiler.utils.prefs.PrefsChangeObserver.PrefToUri.intPrefToUri; import static com.sevtinge.hyperceiler.utils.prefs.PrefsChangeObserver.PrefToUri.stringPrefToUri; import static com.sevtinge.hyperceiler.utils.prefs.PrefsChangeObserver.PrefToUri.stringSetPrefToUri; +import static com.sevtinge.hyperceiler.utils.prefs.PrefsUtils.mPrefsMap; import android.content.Context; import android.database.ContentObserver; import android.net.Uri; import android.os.Handler; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.provider.SharedPrefsProvider; public class PrefsChangeObserver extends ContentObserver { @@ -100,7 +100,7 @@ public void onChange(PrefType type, Uri uri, String name, Object def) { } private void applyChange() { - XposedInit.mPrefsMap.put(name, switch (prefType) { + mPrefsMap.put(name, switch (prefType) { case String -> PrefsUtils.getSharedStringPrefs(context, name, (String) def); case StringSet -> PrefsUtils.getSharedStringSetPrefs(context, name); case Integer -> PrefsUtils.getSharedIntPrefs(context, name, (Integer) def); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsUtils.java b/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsUtils.java index 0261f19d98..0c3c7b361d 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsUtils.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/prefs/PrefsUtils.java @@ -25,7 +25,6 @@ import android.net.Uri; import android.util.Log; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.provider.SharedPrefsProvider; import com.sevtinge.hyperceiler.utils.Helpers; import com.sevtinge.hyperceiler.utils.api.ProjectApi; @@ -40,8 +39,8 @@ import de.robv.android.xposed.XposedBridge; public class PrefsUtils { - public static SharedPreferences mSharedPreferences = null; + public static PrefsMap mPrefsMap = new PrefsMap<>(); public static String mPrefsPathCurrent = null; public static String mPrefsFileCurrent = null; @@ -49,7 +48,6 @@ public class PrefsUtils { public static String mPrefsPath = "/data/user_de/0/" + ProjectApi.mAppModulePkg + "/shared_prefs"; public static String mPrefsFile = mPrefsPath + "/" + mPrefsName + ".xml"; - public static SharedPreferences getSharedPrefs(Context context, boolean multiProcess) { context = Helpers.getProtectedContext(context); try { @@ -62,8 +60,7 @@ public static SharedPreferences getSharedPrefs(Context context, boolean multiPro public static SharedPreferences getSharedPrefs(Context context) { return getSharedPrefs(context, false); } - - + public static String getSharedPrefsPath() { if (mPrefsPathCurrent == null) try { Field mFile = mSharedPreferences.getClass().getDeclaredField("mFile"); @@ -119,8 +116,8 @@ public static String getSharedStringPrefs(Context context, String name, String d XposedBridge.log(t); } - if (XposedInit.mPrefsMap.containsKey(name)) - return (String) XposedInit.mPrefsMap.getObject(name, defValue); + if (mPrefsMap.containsKey(name)) + return (String) mPrefsMap.getObject(name, defValue); else return defValue; } @@ -143,8 +140,8 @@ public static Set getSharedStringSetPrefs(Context context, String name) } LinkedHashSet empty = new LinkedHashSet<>(); - if (XposedInit.mPrefsMap.containsKey(name)) { - return (Set) XposedInit.mPrefsMap.getObject(name, empty); + if (mPrefsMap.containsKey(name)) { + return (Set) mPrefsMap.getObject(name, empty); } else { return empty; } @@ -164,8 +161,8 @@ public static int getSharedIntPrefs(Context context, String name, int defValue) XposedBridge.log(t); } - if (XposedInit.mPrefsMap.containsKey(name)) - return (int) XposedInit.mPrefsMap.getObject(name, defValue); + if (mPrefsMap.containsKey(name)) + return (int) mPrefsMap.getObject(name, defValue); else return defValue; } @@ -183,8 +180,8 @@ public static boolean getSharedBoolPrefs(Context context, String name, boolean d XposedBridge.log(t); } - if (XposedInit.mPrefsMap.containsKey(name)) - return (boolean) XposedInit.mPrefsMap.getObject(name, false); + if (mPrefsMap.containsKey(name)) + return (boolean) mPrefsMap.getObject(name, false); else return defValue; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/view/BlurFrameLayout.java b/app/src/main/java/com/sevtinge/hyperceiler/view/BlurFrameLayout.java index 5f0280027f..b633216e5f 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/view/BlurFrameLayout.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/view/BlurFrameLayout.java @@ -18,6 +18,8 @@ */ package com.sevtinge.hyperceiler.view; +import static com.sevtinge.hyperceiler.utils.prefs.PrefsUtils.mPrefsMap; + import android.content.Context; import android.graphics.Color; import android.graphics.drawable.Drawable; @@ -28,7 +30,6 @@ import androidx.annotation.NonNull; -import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.utils.devicesdk.DisplayUtils; import de.robv.android.xposed.XposedHelpers; @@ -64,11 +65,11 @@ public BlurFrameLayout(View view, String key) { String mBlurRadiusKey = key + "_blur_radius"; - mBlurRadius = XposedInit.mPrefsMap.getInt(mBlurRadiusKey, 60); + mBlurRadius = mPrefsMap.getInt(mBlurRadiusKey, 60); - mBgColor = XposedInit.mPrefsMap.getInt(mBgColorKey, -1); - mBgAlpha = XposedInit.mPrefsMap.getInt(mBgAlphaKey, 60); - mBgCornerRadius = DisplayUtils.dp2px(XposedInit.mPrefsMap.getInt(mBgCornerRadiusKey, 90)); + mBgColor = mPrefsMap.getInt(mBgColorKey, -1); + mBgAlpha = mPrefsMap.getInt(mBgAlphaKey, 60); + mBgCornerRadius = DisplayUtils.dp2px(mPrefsMap.getInt(mBgCornerRadiusKey, 90)); } setOnAttachStateChangeListener(mBlurView); }