Skip to content

Commit

Permalink
Merge branch 'main' into horange
Browse files Browse the repository at this point in the history
  • Loading branch information
Horange321 committed Mar 30, 2024
2 parents fd5c29e + a7fe2c1 commit bdb5c22
Show file tree
Hide file tree
Showing 57 changed files with 1,707 additions and 676 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ jobs:
name: HyperCeiler Canary
path: ${{ env.APK_FILE_CANARY }}

- name: Commit
run: |
text="${{ github.event.sha }} ${{ github.event.head_commit.message }}"
echo "commit=$(echo $text | sed 's/\([][\\`.*^$\/+?{}()=!|:-]\)/\\\1/g')" >> $GITHUB_ENV
- name: Post to Canary Channel
if: ${{ github.ref == 'refs/heads/main' && github.ref_type != 'tag' && contains(github.event.head_commit.message, '[skip post]') == false && contains(github.event.head_commit.message, 's#') == false }}
shell: bash
Expand All @@ -80,11 +75,10 @@ jobs:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
CANARY: ${{ env.APK_FILE_CANARY }}
COMMIT_MESSAGE: |+
**New push to github\!**
`${{ env.commit }}`
by ${{ github.event.head_commit.author.name }}
New push to GitHub
```
${{ github.event.head_commit.message }}
```by `${{ github.event.head_commit.author.name }}`
See commit detail [here](${{ github.event.head_commit.url }})
run: |
ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))')
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/android_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ jobs:
GROUP_DEBUG_ID: ${{ secrets.GROUP_DEBUG_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
DEBUG: ${{ env.APK_FILE_DEBUG }}
COMMIT_MESSAGE: |+
**New PR to gitHub\!**
by ${{ github.triggering_actor }}
COMMIT_MESSAGE: |+
New push to GitHub
by `${{ github.triggering_actor }}`
See commit detail [here](${{ github.event.head_commit.url }})
run: |
ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))')
cd ${{ github.workspace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
import com.sevtinge.hyperceiler.module.hook.home.dock.DockCustomNew;
import com.sevtinge.hyperceiler.module.hook.home.dock.FoldDeviceDock;
import com.sevtinge.hyperceiler.module.hook.home.dock.FoldDock;
import com.sevtinge.hyperceiler.module.hook.home.dock.HideDock;
import com.sevtinge.hyperceiler.module.hook.home.dock.ShowDockIconTitle;
import com.sevtinge.hyperceiler.module.hook.home.dock.SlideUpOnlyShowDock;
import com.sevtinge.hyperceiler.module.hook.home.drawer.AllAppsContainerViewBlur;
import com.sevtinge.hyperceiler.module.hook.home.drawer.AppDrawer;
import com.sevtinge.hyperceiler.module.hook.home.drawer.PinyinArrangement;
Expand Down Expand Up @@ -251,6 +253,8 @@ public void handleLoadPackage() {
initHook(ShowDockIconTitle.INSTANCE, mPrefsMap.getBoolean("home_dock_icon_title"));
initHook(new HideNavigationBar(), mPrefsMap.getBoolean("system_ui_hide_navigation_bar"));
initHook(DisableRecentsIcon.INSTANCE, mPrefsMap.getBoolean("home_dock_disable_recents_icon"));
initHook(SlideUpOnlyShowDock.INSTANCE, mPrefsMap.getBoolean("home_dock_slide_up_only_show_dock") && !mPrefsMap.getBoolean("home_dock_hide_dock"));
initHook(HideDock.INSTANCE, mPrefsMap.getBoolean("home_dock_hide_dock"));

// 其他
initHook(new LockApp(), mPrefsMap.getBoolean("system_framework_guided_access"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void handleLoadPackage() {

// Other
initHook(new PackagePermissions());
initHook(new RotationButton(), mPrefsMap.getBoolean("system_framework_other_rotation_button"));
initHook(new RotationButton(), mPrefsMap.getStringAsInt("system_framework_other_rotation_button_int", 0) == 2);
initHook(new GlobalActions(), mLoadPackageParam.processName.equals("android"));
initHook(new ThermalBrightness(), mPrefsMap.getBoolean("system_framework_other_thermal_brightness"));
initHook(DisableCleaner.INSTANCE, mPrefsMap.getBoolean("system_framework_other_disable_cleaner"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@
import com.sevtinge.hyperceiler.module.hook.systemui.DisableBottomBar;
import com.sevtinge.hyperceiler.module.hook.systemui.DisableMiuiMultiWinSwitch;
import com.sevtinge.hyperceiler.module.hook.systemui.DisableTransparent;
import com.sevtinge.hyperceiler.module.hook.systemui.MediaButton;
import com.sevtinge.hyperceiler.module.hook.systemui.MonetThemeOverlay;
import com.sevtinge.hyperceiler.module.hook.systemui.NotificationFix;
import com.sevtinge.hyperceiler.module.hook.systemui.NotificationFreeform;
import com.sevtinge.hyperceiler.module.hook.systemui.QSDetailBackGround;
import com.sevtinge.hyperceiler.module.hook.systemui.SquigglyProgress;
import com.sevtinge.hyperceiler.module.hook.systemui.StatusBarActions;
import com.sevtinge.hyperceiler.module.hook.systemui.UiLockApp;
import com.sevtinge.hyperceiler.module.hook.systemui.UnimportantNotification;
import com.sevtinge.hyperceiler.module.hook.systemui.UnlockClipboard;
import com.sevtinge.hyperceiler.module.hook.systemui.UnlockCustomActions;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.AddBlurEffectToNotificationView;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.AllowAllThemesNotificationBlur;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.CCGrid;
Expand All @@ -52,6 +56,8 @@
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.GmsTile;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.HideDelimiter;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MediaControlPanelBackgroundMix;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MediaControlPanelTimeViewTextSize;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MediaControlSeekbarCustom;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MoreCardTiles;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.MuteVisibleNotifications;
import com.sevtinge.hyperceiler.module.hook.systemui.controlcenter.NotificationImportanceHyperOSFix;
Expand Down Expand Up @@ -132,7 +138,8 @@
public class SystemUI extends BaseModule {
@Override
public void handleLoadPackage() {

// PluginHelper
initHook(new PluginHelper());
// 充电动画
initHook(new ChargeAnimationStyle(), mPrefsMap.getStringAsInt("system_ui_charge_animation_style", 0) > 0);
// initHook(DisableChargeAnimation.INSTANCE);
Expand All @@ -153,6 +160,12 @@ public void handleLoadPackage() {

initHook(new StatusBarIcon());
initHook(new IconsFromSystemManager());
initHook(new UnlockCustomActions(), mPrefsMap.getBoolean("system_ui_control_center_media_control_unlock_custom_actions"));
initHook(new MediaButton(), mPrefsMap.getInt("system_ui_control_center_media_control_media_button", 140) != 140
|| mPrefsMap.getInt("system_ui_control_center_media_control_media_button_custom", 140) != 140);
initHook(new SquigglyProgress(), mPrefsMap.getStringAsInt("system_ui_control_center_media_control_progress_mode", 0) == 1);
initHook(new MediaControlSeekbarCustom(), mPrefsMap.getStringAsInt("system_ui_control_center_media_control_progress_mode", 0) == 2);
initHook(new MediaControlPanelTimeViewTextSize(), mPrefsMap.getInt("system_ui_control_center_media_control_time_view_text_size", 13) != 13);
initHook(new BluetoothIcon(), mPrefsMap.getStringAsInt("system_ui_status_bar_icon_bluetooth", 0) != 0 && !isMoreHyperOSVersion(1f));
initHook(new WifiStandard(), mPrefsMap.getStringAsInt("system_ui_status_bar_icon_wifi_standard", 0) > 0);
initHook(new SelectiveHideIconForAlarmClock(), mPrefsMap.getStringAsInt("system_ui_status_bar_icon_alarm_clock", 0) == 3 && mPrefsMap.getInt("system_ui_status_bar_icon_alarm_clock_n", 0) > 0);
Expand Down Expand Up @@ -226,6 +239,8 @@ public void handleLoadPackage() {
initHook(new DisplayHardwareDetail(), mPrefsMap.getBoolean("system_ui_statusbar_battery_enable") ||
mPrefsMap.getBoolean("system_ui_statusbar_temp_enable"));

// initHook(new DisplayHardwareDetailForHyper(), true);

// 灵动提示
initHook(HideStrongToast.INSTANCE, mPrefsMap.getBoolean("system_ui_status_bar_strong_toast_hide"));

Expand All @@ -249,7 +264,7 @@ public void handleLoadPackage() {
initHook(HandleLineCustom.INSTANCE, mPrefsMap.getBoolean("system_ui_navigation_handle_custom"));
initHook(new NavigationCustom(), mPrefsMap.getBoolean("system_ui_navigation_custom"));
initHook(new HideNavigationBar(), mPrefsMap.getBoolean("system_ui_hide_navigation_bar"));
initHook(new RotationButton(), true);
initHook(new RotationButton(), mPrefsMap.getStringAsInt("system_framework_other_rotation_button_int", 0) != 0);
// 状态栏布局
initHook(StatusBarLayout.INSTANCE, mPrefsMap.getBoolean("system_ui_statusbar_layout_compatibility_mode") ||
mPrefsMap.getStringAsInt("system_ui_statusbar_layout_mode", 0) != 0);
Expand All @@ -260,6 +275,7 @@ public void handleLoadPackage() {

// 控制中心
// initHook(new SmartHome(), false);
initHook(new UnimportantNotification(), mPrefsMap.getBoolean("system_ui_control_center_unimportant_notification"));
initHook(new BlurEnable(), mPrefsMap.getBoolean("system_ui_control_center_statusbar_blur"));
initHook(new ExpandNotification(), !mPrefsMap.getStringSet("system_ui_control_center_expand_notification").isEmpty());
initHook(new HideDelimiter(), mPrefsMap.getStringAsInt("system_ui_control_center_hide_operator", 0) != 0);
Expand All @@ -280,12 +296,16 @@ public void handleLoadPackage() {
initHook(NotificationWeatherOld.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_show_weather"));
initHook(NotificationWeatherNew.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_show_weather"));
initHook(CompactNotificationsHook.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_compact_notice"));
initHook(CCGrid.INSTANCE, mPrefsMap.getInt("system_control_center_cc_rows", 4) > 4 ||
/*initHook(CCGridOld.INSTANCE, mPrefsMap.getInt("system_control_center_cc_rows", 4) > 4 ||
mPrefsMap.getInt("system_control_center_cc_columns", 4) > 4 ||
(mPrefsMap.getBoolean("system_ui_control_center_rounded_rect") && !isMoreHyperOSVersion(1f)) ||
mPrefsMap.getBoolean("system_control_center_qs_tile_label"));
initHook(new QSGrid(), mPrefsMap.getBoolean("system_control_center_old_enable"));
initHook(new QQSGrid(), mPrefsMap.getBoolean("system_control_center_old_enable"));
mPrefsMap.getBoolean("system_control_center_qs_tile_label"));*/
initHook(new CCGrid(), (mPrefsMap.getInt("system_control_center_cc_rows", 4) > 4 ||
mPrefsMap.getInt("system_control_center_cc_columns", 4) > 4 ||
mPrefsMap.getBoolean("system_ui_control_center_rounded_rect") ||
mPrefsMap.getBoolean("system_control_center_qs_tile_label")) && !isMoreHyperOSVersion(1f));
initHook(new QSGrid(), mPrefsMap.getBoolean("system_control_center_old_enable"));
initHook(new QQSGrid(), mPrefsMap.getBoolean("system_control_center_old_enable"));
initHook(new MoreCardTiles(), mPrefsMap.getStringAsInt("system_ui_control_center_more_card_tiles", 0) != 0);
initHook(new AutoCollapse(), mPrefsMap.getBoolean("system_ui_control_auto_close"));
initHook(RedirectToNotificationChannelSetting.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_redirect_notice"));
Expand Down Expand Up @@ -332,7 +352,5 @@ public void handleLoadPackage() {
initHook(DoubleTapToSleep.INSTANCE, mPrefsMap.getBoolean("system_ui_status_bar_double_tap_to_sleep"));

initHook(new AllowManageAllNotifications(), mPrefsMap.getBoolean("system_framework_allow_manage_all_notifications"));

initHook(new PluginHelper());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import com.github.kyuubiran.ezxhelper.EzXHelper;
import com.sevtinge.hyperceiler.XposedInit;
import com.sevtinge.hyperceiler.module.base.dexkit.DexKit;
import com.sevtinge.hyperceiler.module.base.dexkit.InitDexKit;
import com.sevtinge.hyperceiler.utils.ContextUtils;
import com.sevtinge.hyperceiler.utils.api.ProjectApi;
Expand All @@ -32,17 +33,8 @@ public abstract class BaseModule implements IXposedHook {

public LoadPackageParam mLoadPackageParam = null;
public String TAG = getClass().getSimpleName();
public static ILoadDexKit loadDexKit;
public final PrefsMap<String, Object> mPrefsMap = XposedInit.mPrefsMap;

public interface ILoadDexKit {
void createDexKit(LoadPackageParam lpparam, String TAG);
}

public static void setLoadDexKit(ILoadDexKit iLoadDexKit) {
loadDexKit = iLoadDexKit;
}

public void init(LoadPackageParam lpparam) {
EzXHelper.initHandleLoadPackage(lpparam);
EzXHelper.setLogTag(TAG);
Expand All @@ -53,6 +45,11 @@ public void init(LoadPackageParam lpparam) {
ContextUtils.getWaitContext(
context -> {
if (context != null) {
// try {
// Handler handler = new Handler(context.getMainLooper());
// BaseXposedInit.mResHook.putHandler(handler);
// } catch (Throwable e) {
// }
BaseXposedInit.mResHook.loadModuleRes(context);
// mResHook.loadModuleRes(context);
}
Expand All @@ -62,12 +59,11 @@ public void init(LoadPackageParam lpparam) {
XposedLogUtils.logE(TAG, "get context failed!" + e);
}
mLoadPackageParam = lpparam;
InitDexKit kit = new InitDexKit(lpparam, TAG);
DexKit.INSTANCE.setInitDexKit(kit);
initZygote();
DexKitHelper helper = new DexKitHelper();
InitDexKit kit = new InitDexKit();
loadDexKit.createDexKit(mLoadPackageParam, TAG);
handleLoadPackage();
if (helper.useDexKit) {
if (kit.isInit) {
try {
kit.closeHostDir();
// XposedLogUtils.logE(TAG, "close dexkit s: " + lpparam.packageName);
Expand All @@ -90,17 +86,4 @@ public void initHook(BaseHook baseHook, boolean isInit) {
baseHook.onCreate(mLoadPackageParam);
}
}

private static class DexKitHelper implements InitDexKit.IUseDexKit {
public boolean useDexKit = false;

public DexKitHelper() {
InitDexKit.setUseDexKit(this);
}

@Override
public void useDexKit(boolean use) {
useDexKit = use;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public abstract class BaseXposedInit {
@CallSuper
public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
setXSharedPrefs();
mResHook = new ResourcesTool();
mResHook = new ResourcesTool(startupParam.modulePath);
mModulePath = startupParam.modulePath;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,18 @@
*/
package com.sevtinge.hyperceiler.module.base.dexkit

import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam
import org.luckypray.dexkit.DexKitBridge
import org.luckypray.dexkit.query.enums.StringMatchType
import org.luckypray.dexkit.query.matchers.ClassMatcher
import org.luckypray.dexkit.query.matchers.MethodMatcher
import org.luckypray.dexkit.*
import org.luckypray.dexkit.query.enums.*
import org.luckypray.dexkit.query.matchers.*

/**
* DexKit 工具
*/
object DexKit {
var hostDir: String? = null
var isInitialized = false
val dexKitBridge: DexKitBridge by lazy {
InitDexKit.init()
}
var initDexKit: InitDexKit? = null

/**
* 初始化 DexKit 的 apk 完整路径
*/
fun initDexKit(loadPackageParam: LoadPackageParam) {
hostDir = loadPackageParam.appInfo.sourceDir
}

/**
* 关闭 DexKit bridge
*/
fun closeDexKit() {
if (isInitialized) dexKitBridge.close()
val dexKitBridge: DexKitBridge by lazy {
initDexKit!!.init()
}

/**
Expand Down
Loading

0 comments on commit bdb5c22

Please sign in to comment.