Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
fix: Flag Secure
Browse files Browse the repository at this point in the history
  • Loading branch information
lingqiqi5211 authored and Sevtinge committed Dec 31, 2024
1 parent abf4a91 commit 5f0d6b9
Show file tree
Hide file tree
Showing 9 changed files with 296 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package com.sevtinge.hyperceiler.module.app;

import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreAndroidVersion;

import android.text.TextUtils;

import com.hchen.database.HookBase;
Expand All @@ -26,6 +28,7 @@
import com.sevtinge.hyperceiler.module.hook.screenshot.SaveToPictures;
import com.sevtinge.hyperceiler.module.hook.screenshot.UnlockMinimumCropLimit2;
import com.sevtinge.hyperceiler.module.hook.screenshot.UnlockPrivacyMarking;
import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure;
import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard;

@HookBase(targetPackage = "com.miui.screenshot")
Expand All @@ -39,5 +42,6 @@ public void handleLoadPackage() {
initHook(UnlockPrivacyMarking.INSTANCE, mPrefsMap.getBoolean("screenshot_unlock_privacy_marking"));
// 超级剪切板
initHook(UnlockSuperClipboard.INSTANCE, mPrefsMap.getStringAsInt("various_super_clipboard_e", 0) != 0);
initHook(new FlagSecure(), mPrefsMap.getBoolean("system_other_flag_secure") && isMoreAndroidVersion(33));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import com.hchen.database.HookBase;
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure;
import com.sevtinge.hyperceiler.module.hook.systemui.AllowManageAllNotifications;
import com.sevtinge.hyperceiler.module.hook.systemui.AutoCollapse;
import com.sevtinge.hyperceiler.module.hook.systemui.BluetoothRestrict;
Expand Down Expand Up @@ -276,6 +277,7 @@ public void handleLoadPackage() {
initHook(StatusBarLayout.INSTANCE, mPrefsMap.getBoolean("system_ui_statusbar_layout_compatibility_mode") ||
mPrefsMap.getStringAsInt("system_ui_statusbar_layout_mode", 0) != 0);

initHook(new FlagSecure(), mPrefsMap.getBoolean("system_other_flag_secure"));
// 实验性功能
// initHook(new SwitchControlPanel(), false);
// initHook(new MiuiGxzwSize(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.hchen.database.HookBase;
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure;
import com.sevtinge.hyperceiler.module.hook.systemui.AllowManageAllNotifications;
import com.sevtinge.hyperceiler.module.hook.systemui.AutoCollapse;
import com.sevtinge.hyperceiler.module.hook.systemui.BluetoothRestrict;
Expand Down Expand Up @@ -164,6 +165,8 @@ public void handleLoadPackage() {
// Monet
initHook(new MonetThemeOverlay(), mPrefsMap.getBoolean("system_ui_monet_overlay_custom"));

initHook(new FlagSecure(), mPrefsMap.getBoolean("system_other_flag_secure"));

// 状态栏图标
boolean isHideSim = (mPrefsMap.getBoolean("system_ui_status_bar_icon_mobile_network_hide_card_1") ||
mPrefsMap.getBoolean("system_ui_status_bar_icon_mobile_network_hide_card_2")) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.hchen.database.HookBase;
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure;
import com.sevtinge.hyperceiler.module.hook.systemui.AllowManageAllNotifications;
import com.sevtinge.hyperceiler.module.hook.systemui.AutoCollapse;
import com.sevtinge.hyperceiler.module.hook.systemui.BrightnessPct;
Expand Down Expand Up @@ -135,6 +136,7 @@ public void handleLoadPackage() {
// initHook(Island.INSTANCE, true); // 灵动岛
initHook(new ChargeAnimationStyle(), mPrefsMap.getStringAsInt("system_ui_charge_animation_style", 0) > 0);
// initHook(DisableChargeAnimation.INSTANCE);
initHook(new FlagSecure(), mPrefsMap.getBoolean("system_other_flag_secure"));

// 小窗
initHook(new NotificationFreeform(), mPrefsMap.getBoolean("system_ui_notification_freeform"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import com.hchen.database.HookBase;
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure;
import com.sevtinge.hyperceiler.module.hook.systemui.AllowManageAllNotifications;
import com.sevtinge.hyperceiler.module.hook.systemui.AutoCollapse;
import com.sevtinge.hyperceiler.module.hook.systemui.BluetoothRestrict;
Expand Down Expand Up @@ -276,6 +277,7 @@ public void handleLoadPackage() {
initHook(StatusBarLayout.INSTANCE, mPrefsMap.getBoolean("system_ui_statusbar_layout_compatibility_mode") ||
mPrefsMap.getStringAsInt("system_ui_statusbar_layout_mode", 0) != 0);

initHook(new FlagSecure(), mPrefsMap.getBoolean("system_other_flag_secure"));
// 实验性功能
// initHook(new SwitchControlPanel(), false);
// initHook(new MiuiGxzwSize(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.hchen.database.HookBase;
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure;
import com.sevtinge.hyperceiler.module.hook.systemui.AllowManageAllNotifications;
import com.sevtinge.hyperceiler.module.hook.systemui.AutoCollapse;
import com.sevtinge.hyperceiler.module.hook.systemui.BluetoothRestrict;
Expand Down Expand Up @@ -161,6 +162,8 @@ public void handleLoadPackage() {
// Monet
initHook(new MonetThemeOverlay(), mPrefsMap.getBoolean("system_ui_monet_overlay_custom"));

initHook(new FlagSecure(), mPrefsMap.getBoolean("system_other_flag_secure"));

// 状态栏图标
boolean isHideSim = (mPrefsMap.getBoolean("system_ui_status_bar_icon_mobile_network_hide_card_1") ||
mPrefsMap.getBoolean("system_ui_status_bar_icon_mobile_network_hide_card_2")) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.hchen.database.HookBase;
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.systemframework.FlagSecure;
import com.sevtinge.hyperceiler.module.hook.systemui.AllowManageAllNotifications;
import com.sevtinge.hyperceiler.module.hook.systemui.AutoCollapse;
import com.sevtinge.hyperceiler.module.hook.systemui.BrightnessPct;
Expand Down Expand Up @@ -137,6 +138,7 @@ public void handleLoadPackage() {
// PluginHelper
initHook(NewPluginHelperKt.INSTANCE);
// initHook(Island.INSTANCE, true); // 灵动岛
initHook(new FlagSecure(), mPrefsMap.getBoolean("system_other_flag_secure"));

// 小窗
initHook(new NotificationFreeform(), mPrefsMap.getBoolean("system_ui_notification_freeform"));
Expand Down
Loading

0 comments on commit 5f0d6b9

Please sign in to comment.