Skip to content

Commit

Permalink
超大音量
Browse files Browse the repository at this point in the history
  • Loading branch information
hosizoraru committed Oct 6, 2023
1 parent e3575f0 commit ffb88c9
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class ControlCenterPage : BasePage() {
),
SwitchV("control_center_style"),
)
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.super_volume,
tipsId = R.string.require_system_support,
),
SwitchV("super_volume"),
)
Line()
val ccBinding = GetDataBinding({
safeSP.getBoolean(
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/kotlin/star/sky/voyager/hook/apps/SystemUI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import star.sky.voyager.hook.hooks.systemui.StatusBarDoubleTapToSleep
import star.sky.voyager.hook.hooks.systemui.StatusBarLayout
import star.sky.voyager.hook.hooks.systemui.StatusBarNetworkSpeedRefreshSpeed
import star.sky.voyager.hook.hooks.systemui.StatusBarTimeCustomization
import star.sky.voyager.hook.hooks.systemui.SuperVolume
import star.sky.voyager.hook.hooks.systemui.UseNewHD
import star.sky.voyager.hook.hooks.systemui.WaveCharge
import star.sky.voyager.utils.init.AppRegister
Expand Down Expand Up @@ -116,6 +117,7 @@ object SystemUI : AppRegister() {
LockScreenOnlyLeft, // 仅移除锁屏界面的左滑
NoPasswordHook, // 开机免输密码
OldQSCustom, // 自定义行列数
SuperVolume,
// 状态栏网络速度 Start
StatusBarNetworkSpeedRefreshSpeed,
HideStatusBarNetworkSpeedSecond,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package star.sky.voyager.hook.hooks.systemui

import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.hasEnable
import star.sky.voyager.utils.voyager.PluginClassLoader.hookPluginClassLoader

object SuperVolume : HookRegister() {
override fun init() = hasEnable("super_volume") {
hookPluginClassLoader { _, classLoader ->
loadClass(
"miui.systemui.util.CommonUtils",
classLoader
).methodFinder().filter {
name in setOf(
"supportSuperVolume",
"voiceSupportSuperVolume",
)
}.toList().createHooks {
returnConstant(true)
}
}
}
}
2 changes: 2 additions & 0 deletions app/src/main/res/values-ja-rJP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<string name="unlock_for_pad">主に Pad のロックを解除するためです</string>
<string name="only_compatible_phone">一時的にスマートフォンに対応しました</string>
<string name="require_hardware_support">ハードウェアサポートが必要です</string>
<string name="require_system_support">システムレベルのサポートが必要です</string>
<string name="camera_sensor">カメラセンサー</string>
<string name="mic_sensor">マイクセンサー</string>
<string name="multiple_instances">複数起動</string>
Expand Down Expand Up @@ -781,4 +782,5 @@
<string name="current_mA">電流単位は mA を使用</string>
<string name="no_need_to_enter_password_when_power_on">電源を入れるときにパスワードを入力する必要はありません</string>
<string name="no_need_to_enter_password_when_power_on_summary">端末が暗号化されていない場合のみ有効</string>
<string name="super_volume">スーパーボリューム</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<string name="unlock_for_pad">主要是给Pad解锁的</string>
<string name="only_compatible_phone">暂时只适配了手机</string>
<string name="require_hardware_support">需要硬件支持</string>
<string name="require_system_support">需要系统底层支持</string>
<string name="camera_sensor">摄像头传感器</string>
<string name="mic_sensor">麦克风传感器</string>
<string name="multiple_instances">多开</string>
Expand Down Expand Up @@ -781,4 +782,5 @@
<string name="current_mA">电流单位使用 mA</string>
<string name="no_need_to_enter_password_when_power_on">开机免输密码</string>
<string name="no_need_to_enter_password_when_power_on_summary">手机没启用加密才会生效</string>
<string name="super_volume">超大音量</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<string name="unlock_for_pad">It is mainly for the Pad to be unlocked</string>
<string name="only_compatible_phone">Temporarily only compatible with phone</string>
<string name="require_hardware_support">Hardware support is required</string>
<string name="require_system_support">Requires System-level Support</string>
<string name="camera_sensor">Camera Sensor</string>
<string name="mic_sensor">Mic Sensor</string>
<string name="multiple_instances">Multi-instance</string>
Expand Down Expand Up @@ -782,4 +783,5 @@
<string name="current_mA">The current unit uses mA</string>
<string name="no_need_to_enter_password_when_power_on">No need to enter password when power on</string>
<string name="no_need_to_enter_password_when_power_on_summary">The phone is not encrypted to take effect</string>
<string name="super_volume">Super Volume</string>
</resources>

0 comments on commit ffb88c9

Please sign in to comment.