mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 19:31:17 +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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@
|
||||
<string name="hide_nfc_icon">Ocultar icono de NFC</string>
|
||||
<string name="hide_big_hd_icon">Ocultar icono grande HD</string>
|
||||
<string name="hide_small_hd_icon">Ocultar icono pequeño HD</string>
|
||||
<string name="hide_new_hd_icon">Ocultar icono new HD</string>
|
||||
<string name="hide_hd_no_service_icon">Ocultar icono sin servicio HD</string>
|
||||
<string name="about">Acerca de</string>
|
||||
<string name="about_module">Acerca del Módulo</string>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<string name="hide_nfc_icon">隐藏 NFC 图标</string>
|
||||
<string name="hide_big_hd_icon">隐藏 大HD 图标</string>
|
||||
<string name="hide_small_hd_icon">隐藏 小HD 图标</string>
|
||||
<string name="hide_new_hd_icon">隐藏 新HD 图标</string>
|
||||
<string name="hide_hd_no_service_icon">隐藏 HD无服务 图标</string>
|
||||
<string name="about">关于</string>
|
||||
<string name="about_module">关于模块</string>
|
||||
@@ -161,6 +162,8 @@
|
||||
<string name="hide_zen_icon">隐藏 勿扰 图标</string>
|
||||
<string name="hide_icon">隐藏图标</string>
|
||||
<string name="double_tap_to_sleep">双击锁定屏幕</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="home_double_tap_to_sleep_summary">双击空白位置锁屏</string>
|
||||
<string name="old_quick_settings_panel">旧版快速设置面板</string>
|
||||
<string name="old_qs_custom_switch">自定义行列数</string>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<string name="hide_bluetooth_battery_icon">隱藏 藍牙電量 圖標</string>
|
||||
<string name="hide_big_hd_icon">隱藏 大HD 圖標</string>
|
||||
<string name="hide_small_hd_icon">隱藏 小HD 圖標</string>
|
||||
<string name="hide_new_hd_icon">隱藏 新HD 圖標</string>
|
||||
<string name="hide_hd_no_service_icon">隱藏 HD無服務 圖標</string>
|
||||
<string name="about">關於</string>
|
||||
<string name="about_module">關於模塊</string>
|
||||
@@ -156,4 +157,7 @@
|
||||
<string name="hide_zen_icon">隱藏 勿擾 圖標</string>
|
||||
<string name="hide_icon">隱藏圖標</string>
|
||||
<string name="double_tap_to_sleep">雙擊鎖定螢幕</string>
|
||||
|
||||
<string name="no_need_to_enter_password_when_power_on">開機免輸密碼</string>
|
||||
<string name="no_need_to_enter_password_when_power_on_summary">手機沒啟用加密才會生效</string>
|
||||
</resources>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<string name="hide_nfc_icon">隱藏 NFC 圖示</string>
|
||||
<string name="hide_big_hd_icon">隱藏 大HD 圖示</string>
|
||||
<string name="hide_small_hd_icon">隱藏 小HD 圖示</string>
|
||||
<string name="hide_new_hd_icon">隱藏 新HD 圖標</string>
|
||||
<string name="hide_hd_no_service_icon">隱藏 HD無服務 圖示</string>
|
||||
<string name="about">關於</string>
|
||||
<string name="about_module">關於模組</string>
|
||||
@@ -161,6 +162,8 @@
|
||||
<string name="hide_zen_icon">隱藏 勿擾 圖示</string>
|
||||
<string name="hide_icon">隱藏圖示</string>
|
||||
<string name="double_tap_to_sleep">雙擊鎖定螢幕</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="home_double_tap_to_sleep_summary">雙擊空白位置鎖定螢幕</string>
|
||||
<string name="old_quick_settings_panel">舊快速設定面板</string>
|
||||
<string name="old_qs_custom_switch">自定義行與列</string>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<string name="hide_nfc_icon">Hide NFC icon</string>
|
||||
<string name="hide_big_hd_icon">Hide big HD icon</string>
|
||||
<string name="hide_small_hd_icon">Hide small HD icon</string>
|
||||
<string name="hide_new_hd_icon">Hide new HD icon</string>
|
||||
<string name="hide_hd_no_service_icon">Hide HD No Service icon</string>
|
||||
|
||||
<string name="about">About</string>
|
||||
@@ -165,6 +166,8 @@
|
||||
<string name="hide_zen_icon">Hide ZEN icon</string>
|
||||
<string name="hide_icon">Hide Icon</string>
|
||||
<string name="double_tap_to_sleep">Double tap to sleep</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="home_double_tap_to_sleep_summary">Double-tap the blank space to sleep</string>
|
||||
<string name="old_quick_settings_panel">Old quick settings panel</string>
|
||||
<string name="old_qs_custom_switch">Custom rows and columns</string>
|
||||
|
||||
Reference in New Issue
Block a user