mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-13 03:41:19 +08:00
新增 隐藏辅助WIFI图标 功能
This commit is contained in:
@@ -140,6 +140,12 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
add(TextWithSwitchV(TextV(resId = R.string.hide_wifi_icon), SwitchV("hide_wifi_icon")))
|
add(TextWithSwitchV(TextV(resId = R.string.hide_wifi_icon), SwitchV("hide_wifi_icon")))
|
||||||
|
add(
|
||||||
|
TextWithSwitchV(
|
||||||
|
TextV(resId = R.string.hide_slave_wifi_icon),
|
||||||
|
SwitchV("hide_slave_wifi_icon")
|
||||||
|
)
|
||||||
|
)
|
||||||
add(
|
add(
|
||||||
TextWithSwitchV(
|
TextWithSwitchV(
|
||||||
TextV(resId = R.string.hide_hotspot_icon),
|
TextV(resId = R.string.hide_hotspot_icon),
|
||||||
|
|||||||
@@ -255,6 +255,28 @@ class SystemUI : IXposedHookLoadPackage {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
XposedBridge.log(e)
|
XposedBridge.log(e)
|
||||||
}
|
}
|
||||||
|
//隐藏 辅助WIFI 图标
|
||||||
|
try {
|
||||||
|
val classIfExists = XposedHelpers.findClassIfExists(
|
||||||
|
"com.android.systemui.statusbar.policy.SlaveWifiSignalController",
|
||||||
|
lpparam.classLoader
|
||||||
|
)
|
||||||
|
XposedHelpers.findAndHookMethod(
|
||||||
|
classIfExists,
|
||||||
|
"updateIconState",
|
||||||
|
object : XC_MethodHook() {
|
||||||
|
override fun beforeHookedMethod(param: MethodHookParam) {
|
||||||
|
if (prefs.hasFileChanged()) {
|
||||||
|
prefs.reload()
|
||||||
|
}
|
||||||
|
if (prefs.getBoolean("hide_slave_wifi_icon", false)) {
|
||||||
|
param.result = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (e: Exception) {
|
||||||
|
XposedBridge.log(e)
|
||||||
|
}
|
||||||
//隐藏卡一卡二
|
//隐藏卡一卡二
|
||||||
try {
|
try {
|
||||||
val classIfExists = XposedHelpers.findClassIfExists(
|
val classIfExists = XposedHelpers.findClassIfExists(
|
||||||
|
|||||||
@@ -53,5 +53,6 @@
|
|||||||
<string name="Tips">提示</string>
|
<string name="Tips">提示</string>
|
||||||
<string name="skip_waiting_time">跳过 5/10 秒警告时间</string>
|
<string name="skip_waiting_time">跳过 5/10 秒警告时间</string>
|
||||||
<string name="unlock_unlimited_cropping">解锁无限裁切图片/截图</string>
|
<string name="unlock_unlimited_cropping">解锁无限裁切图片/截图</string>
|
||||||
|
<string name="hide_slave_wifi_icon">隐藏 辅助WIFI 图标</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user