Skip to content

Commit

Permalink
opt: codes (skip post -> skp)
Browse files Browse the repository at this point in the history
  • Loading branch information
lingqiqi5211 committed Nov 23, 2024
1 parent f8df155 commit d5d2ea5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
compression-level: 9

push_to_canary_channel:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.ref_type != 'tag' && !contains(github.event.head_commit.message, '[skip post]') && !contains(github.event.head_commit.message, 's#')
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.ref_type != 'tag' && !contains(github.event.head_commit.message, '[skp]') && !contains(github.event.head_commit.message, 's#')
runs-on: ubuntu-latest
name: Push to Canary Channel
needs: build_app
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ jobs:
echo "|Canary|$canary" >> $GITHUB_STEP_SUMMARY
- name: Upload Canary APK
if: ${{ contains(github.event.head_commit.message, '[unupload]') == false && contains(github.event.head_commit.message, '[skip post]') == false }}
if: ${{ contains(github.event.head_commit.message, '[unupload]') == false && contains(github.event.head_commit.message, '[skp]') == false }}
uses: actions/upload-artifact@v4
with:
name: HyperCeiler Canary
path: ${{ env.APK_FILE_CANARY }}

- 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 }}
if: ${{ github.ref == 'refs/heads/main' && github.ref_type != 'tag' && contains(github.event.head_commit.message, '[skp]') == false && contains(github.event.head_commit.message, 's#') == false }}
shell: bash
env:
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,6 @@ public void handleLoadPackage() {
initHook(HideVoWiFiIcon.INSTANCE, mPrefsMap.getBoolean("system_ui_status_bar_icon_vowifi") || mPrefsMap.getBoolean("system_ui_status_bar_icon_volte"));
initHook(new StickyFloatingWindowsForSystemUI(), mPrefsMap.getBoolean("system_framework_freeform_sticky"));

// 移动网络图标
boolean isEnableMobilePublic = mPrefsMap.getBoolean("system_ui_status_bar_icon_mobile_network_hide_card_1") ||
mPrefsMap.getBoolean("system_ui_status_bar_icon_mobile_network_hide_card_2") ||
mPrefsMap.getStringAsInt("system_ui_status_bar_icon_show_mobile_network_type", 0) != 0 ||
mPrefsMap.getBoolean("system_ui_status_bar_mobile_hide_roaming_icon") ||
mPrefsMap.getBoolean("system_ui_statusbar_mobile_type_enable") ||
mPrefsMap.getBoolean("system_ui_status_bar_mobile_indicator");
boolean isEnableMobileNetwork = mPrefsMap.getStringAsInt("system_ui_status_bar_icon_small_hd", 0) != 0 ||
mPrefsMap.getStringAsInt("system_ui_status_bar_icon_big_hd", 0) != 0 ||
mPrefsMap.getStringAsInt("system_ui_status_bar_icon_new_hd", 0) != 0;

initHook(MobilePublicHook.INSTANCE, isEnableMobilePublic);
initHook(new MobileNetwork(), isEnableMobileNetwork);
initHook(new DualRowSignalHook(), mPrefsMap.getBoolean("system_ui_statusbar_network_icon_enable"));
initHook(MobileTypeSingleHook.INSTANCE, mPrefsMap.getBoolean("system_ui_statusbar_mobile_type_enable"));
initHook(MobileTypeTextCustom.INSTANCE, !Objects.equals(mPrefsMap.getString("system_ui_status_bar_mobile_type_custom", ""), ""));

// 电池相关
boolean isHideBatteryIcon = mPrefsMap.getBoolean("system_ui_status_bar_battery_icon") ||
mPrefsMap.getBoolean("system_ui_status_bar_battery_percent") ||
Expand Down Expand Up @@ -217,30 +200,11 @@ public void handleLoadPackage() {
// 灵动舞台
initHook(HideStrongToast.INSTANCE, mPrefsMap.getBoolean("system_ui_status_bar_hide_smart_strong_toast"));

// 居右显示
boolean isWiFiAtLeft = mPrefsMap.getBoolean("system_ui_status_bar_wifi_at_left");
boolean isMobileNetworkAtLeft = mPrefsMap.getBoolean("system_ui_status_bar_mobile_network_at_left");

boolean isNetworkSpeedAtRight = mPrefsMap.getBoolean("system_ui_status_bar_network_speed_at_right");
boolean isAlarmClockAtRight = mPrefsMap.getBoolean("system_ui_status_bar_alarm_clock_at_right");
boolean isNFCAtRight = mPrefsMap.getBoolean("system_ui_status_bar_nfc_at_right");
boolean isVolumeAtRight = mPrefsMap.getBoolean("system_ui_status_bar_volume_at_right");
boolean isZenAtRight = mPrefsMap.getBoolean("system_ui_status_bar_zen_at_right");

boolean isSwapWiFiAndMobileNetwork = mPrefsMap.getBoolean("system_ui_status_bar_swap_wifi_and_mobile_network");

boolean isStatusBarIconAtRightEnable = isWiFiAtLeft || isMobileNetworkAtLeft || isSwapWiFiAndMobileNetwork || isNetworkSpeedAtRight || isAlarmClockAtRight || isNFCAtRight || isVolumeAtRight || isZenAtRight;

initHook(new StatusBarIconPositionAdjust(), isStatusBarIconAtRightEnable);

// 导航栏
initHook(new HandleLineCustom(), 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(), 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);

// 实验性功能
// initHook(new SwitchControlPanel(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,30 +212,11 @@ public void handleLoadPackage() {
// 灵动舞台
initHook(HideStrongToast.INSTANCE, mPrefsMap.getBoolean("system_ui_status_bar_hide_smart_strong_toast"));

// 居右显示
boolean isWiFiAtLeft = mPrefsMap.getBoolean("system_ui_status_bar_wifi_at_left");
boolean isMobileNetworkAtLeft = mPrefsMap.getBoolean("system_ui_status_bar_mobile_network_at_left");

boolean isNetworkSpeedAtRight = mPrefsMap.getBoolean("system_ui_status_bar_network_speed_at_right");
boolean isAlarmClockAtRight = mPrefsMap.getBoolean("system_ui_status_bar_alarm_clock_at_right");
boolean isNFCAtRight = mPrefsMap.getBoolean("system_ui_status_bar_nfc_at_right");
boolean isVolumeAtRight = mPrefsMap.getBoolean("system_ui_status_bar_volume_at_right");
boolean isZenAtRight = mPrefsMap.getBoolean("system_ui_status_bar_zen_at_right");

boolean isSwapWiFiAndMobileNetwork = mPrefsMap.getBoolean("system_ui_status_bar_swap_wifi_and_mobile_network");

boolean isStatusBarIconAtRightEnable = isWiFiAtLeft || isMobileNetworkAtLeft || isSwapWiFiAndMobileNetwork || isNetworkSpeedAtRight || isAlarmClockAtRight || isNFCAtRight || isVolumeAtRight || isZenAtRight;

initHook(new StatusBarIconPositionAdjust(), isStatusBarIconAtRightEnable);

// 导航栏
initHook(new HandleLineCustom(), 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(), 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);

// 实验性功能
// initHook(new SwitchControlPanel(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.Mobi
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.MobilePrefs.getLocation
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.MobilePrefs.hideIndicator
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.MobilePrefs.hideRoaming
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.MobilePrefs.isEnableDouble
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.MobilePrefs.leftMargin
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.MobilePrefs.rightMargin
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.public.MobilePrefs.showMobileType
Expand Down Expand Up @@ -87,7 +88,7 @@ object MobileTypeSingle2Hook : BaseHook() {
}
)
// 隐藏 SIM 卡图标
if (card1 || card2) hideSimIcon()
if ((card1 || card2) && !isEnableDouble) hideSimIcon()
if (!showMobileType) return

miuiMobileIconBinder.methodFinder().filterByName("bind").single()
Expand Down

0 comments on commit d5d2ea5

Please sign in to comment.