mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-13 11:51:22 +08:00
Merge pull request #192
* 同步blockmiui上游 * 同步blockmiui上游 * Merge branch 'Simplicity-Team:main' into main * 删除一个log * 添加 隐藏新HD图标(随缘多语言文件) * Merge remote-tracking branch 'origin/main' * 添加 开机免输密码 * strings.xml
This commit is contained in:
@@ -30,7 +30,7 @@ class SettingsActivity : MIUIActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
if (!checkLSPosed()) isLoad = false
|
||||
super.onCreate(savedInstanceState)
|
||||
if (isLoad && BuildConfig.BUILD_TYPE != "debug") {
|
||||
if (isLoad && !BuildConfig.DEBUG) {
|
||||
AppCenter.start(application, "ae2037d3-9914-4e0c-b02b-f9b2bb2574e5", Analytics::class.java, Crashes::class.java)
|
||||
}
|
||||
}
|
||||
@@ -438,6 +438,7 @@ class SettingsActivity : MIUIActivity() {
|
||||
TextSummaryWithSwitch(TextSummaryV(textId = R.string.enable_wave_charge_animation), SwitchV("enable_wave_charge_animation"))
|
||||
TextSummaryWithSwitch(TextSummaryV(textId = R.string.lock_screen_charging_current, tipsId = R.string.only_official_default_themes_are_supported), SwitchV("lock_screen_charging_current"))
|
||||
TextSummaryWithSwitch(TextSummaryV(textId = R.string.double_tap_to_sleep, tipsId = R.string.home_double_tap_to_sleep_summary), SwitchV("lock_screen_double_tap_to_sleep"))
|
||||
TextSummaryWithSwitch(TextSummaryV(textId = R.string.no_need_to_enter_password_when_power_on, tipsId = R.string.no_need_to_enter_password_when_power_on_summary), SwitchV("no_need_to_enter_password_when_power_on"))
|
||||
Line()
|
||||
TitleText(textId = R.string.old_quick_settings_panel)
|
||||
val oldQSCustomSwitchBinding = GetDataBinding({ safeSP.getBoolean("old_qs_custom_switch", false) }) { view, flags, data ->
|
||||
@@ -565,6 +566,7 @@ class SettingsActivity : MIUIActivity() {
|
||||
TextWithSwitch(TextV(textId = R.string.hide_bluetooth_battery_icon), SwitchV("hide_bluetooth_battery_icon"))
|
||||
TextWithSwitch(TextV(textId = R.string.hide_small_hd_icon), SwitchV("hide_small_hd_icon"))
|
||||
TextWithSwitch(TextV(textId = R.string.hide_big_hd_icon), SwitchV("hide_big_hd_icon"))
|
||||
TextWithSwitch(TextV(textId = R.string.hide_new_hd_icon), SwitchV("hide_new_hd_icon"))
|
||||
TextWithSwitch(TextV(textId = R.string.hide_hd_no_service_icon), SwitchV("hide_hd_no_service_icon"))
|
||||
TextWithSwitch(TextV(textId = R.string.hide_no_sim_icon), SwitchV("hide_no_sim_icon"))
|
||||
TextWithSwitch(TextV(textId = R.string.hide_sim_one_icon), SwitchV("hide_sim_one_icon"))
|
||||
|
||||
@@ -41,6 +41,7 @@ object SystemUI: AppRegister() {
|
||||
CanNotificationSlide, //允许下滑通知打开小窗
|
||||
LockScreenClockDisplaySeconds, // 锁屏时钟显示秒
|
||||
ShowWifiStandard, // 显示 WIFI 角标
|
||||
NoPasswordHook, // 显示 WIFI 角标
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@ package com.lt2333.simplicitytools.hook.app.systemui
|
||||
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import com.github.kyuubiran.ezxhelper.utils.findMethod
|
||||
import com.github.kyuubiran.ezxhelper.utils.getObjectAs
|
||||
import com.github.kyuubiran.ezxhelper.utils.hookAfter
|
||||
import android.util.Log
|
||||
import com.github.kyuubiran.ezxhelper.utils.*
|
||||
import com.lt2333.simplicitytools.util.XSPUtils
|
||||
import com.lt2333.simplicitytools.util.hasEnable
|
||||
import com.lt2333.simplicitytools.util.xposed.base.HookRegister
|
||||
import de.robv.android.xposed.XC_MethodHook
|
||||
@@ -12,6 +12,8 @@ import de.robv.android.xposed.XC_MethodHook
|
||||
object HideHDIcon : HookRegister() {
|
||||
|
||||
override fun init() {
|
||||
|
||||
|
||||
findMethod("com.android.systemui.statusbar.StatusBarMobileView") {
|
||||
name == "initViewState" && parameterCount == 1
|
||||
}.hookAfter {
|
||||
@@ -23,6 +25,11 @@ object HideHDIcon : HookRegister() {
|
||||
}.hookAfter {
|
||||
hide(it)
|
||||
}
|
||||
hasEnable("hide_new_hd_icon") {
|
||||
findMethod("com.android.systemui.statusbar.policy.HDController") { name == "update" }.hookBefore {
|
||||
it.result = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun hide(it: XC_MethodHook.MethodHookParam) {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.lt2333.simplicitytools.hook.app.systemui
|
||||
|
||||
import com.github.kyuubiran.ezxhelper.utils.findMethod
|
||||
import com.github.kyuubiran.ezxhelper.utils.hookBefore
|
||||
import com.lt2333.simplicitytools.util.hasEnable
|
||||
import com.lt2333.simplicitytools.util.xposed.base.HookRegister
|
||||
|
||||
object NoPasswordHook : HookRegister() {
|
||||
|
||||
override fun init() {
|
||||
hasEnable("no_need_to_enter_password_when_power_on") {
|
||||
findMethod("com.android.internal.widget.LockPatternUtils\$StrongAuthTracker") { name == "isBiometricAllowedForUser" }.hookBefore {
|
||||
it.result = true
|
||||
}
|
||||
findMethod("com.android.internal.widget.LockPatternUtils") { name == "isBiometricAllowedForUser" }.hookBefore {
|
||||
it.result = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user