mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 11:21:18 +08:00
新增隐藏数据类型图标
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -33,8 +33,10 @@ class SystemUI : IXposedHookLoadPackage {
|
||||
HideNoSimIcon().handleLoadPackage(lpparam)
|
||||
//隐藏SIM卡图标
|
||||
HideSimIcon().handleLoadPackage(lpparam)
|
||||
//隐藏流量活动图标
|
||||
//隐藏移动箭头图标
|
||||
HideMobileActivityIcon().handleLoadPackage(lpparam)
|
||||
//隐藏移动类型图标
|
||||
HideMobileTypeIcon().handleLoadPackage(lpparam)
|
||||
//隐藏辅助WIFI图标
|
||||
HideSlaveWifiIcon().handleLoadPackage(lpparam)
|
||||
//隐藏状态栏网速/s
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.lt2333.simplicitytools.hook.app.systemui
|
||||
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.lt2333.simplicitytools.util.XSPUtils
|
||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||
import de.robv.android.xposed.XC_MethodHook
|
||||
import de.robv.android.xposed.XposedHelpers
|
||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||
|
||||
class HideMobileTypeIcon : IXposedHookLoadPackage {
|
||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||
val classIfExists = XposedHelpers.findClassIfExists(
|
||||
"com.android.systemui.statusbar.StatusBarMobileView",
|
||||
lpparam.classLoader
|
||||
)
|
||||
XposedHelpers.findAndHookMethod(
|
||||
classIfExists,
|
||||
"initViewState",
|
||||
"com.android.systemui.statusbar.phone.StatusBarSignalPolicy\$MobileIconState",
|
||||
object : XC_MethodHook() {
|
||||
override fun afterHookedMethod(param: MethodHookParam) {
|
||||
if (XSPUtils.getBoolean("hide_mobile_type_icon", false)) {
|
||||
(XposedHelpers.getObjectField(
|
||||
param.thisObject,
|
||||
"mMobileType"
|
||||
) as TextView).visibility = View.INVISIBLE
|
||||
|
||||
(XposedHelpers.getObjectField(
|
||||
param.thisObject,
|
||||
"mMobileTypeImage"
|
||||
) as ImageView).visibility = View.INVISIBLE
|
||||
|
||||
(XposedHelpers.getObjectField(
|
||||
param.thisObject,
|
||||
"mMobileTypeSingle"
|
||||
) as TextView).visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
XposedHelpers.findAndHookMethod(
|
||||
classIfExists,
|
||||
"updateState",
|
||||
"com.android.systemui.statusbar.phone.StatusBarSignalPolicy\$MobileIconState",
|
||||
object : XC_MethodHook() {
|
||||
override fun afterHookedMethod(param: MethodHookParam) {
|
||||
if (XSPUtils.getBoolean("hide_mobile_type_icon", false)) {
|
||||
(XposedHelpers.getObjectField(
|
||||
param.thisObject,
|
||||
"mMobileType"
|
||||
) as TextView).visibility = View.INVISIBLE
|
||||
|
||||
(XposedHelpers.getObjectField(
|
||||
param.thisObject,
|
||||
"mMobileTypeImage"
|
||||
) as ImageView).visibility = View.INVISIBLE
|
||||
|
||||
(XposedHelpers.getObjectField(
|
||||
param.thisObject,
|
||||
"mMobileTypeSingle"
|
||||
) as TextView).visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -117,4 +117,5 @@
|
||||
<string name="unlock_unlimited_cropping_summary">无视MIUI对图片裁切的最小限制</string>
|
||||
<string name="hide_wifi_activity_icon">隐藏 WIFI箭头 图标</string>
|
||||
<string name="hide_mobile_activity_icon">隐藏 移动箭头 图标</string>
|
||||
<string name="hide_mobile_type_icon">隐藏 移动类型 图标</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user