新增移除锁屏负一屏功能

This commit is contained in:
乌堆小透明
2022-03-02 23:51:52 +08:00
parent 5f5fbad15a
commit 0fd94b2ca5
4 changed files with 31 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -49,12 +49,13 @@ class SystemUI : IXposedHookLoadPackage {
StatusBarNetworkSpeedRefreshSpeed().handleLoadPackage(lpparam)
//状态栏时钟自定义
StatusBarTimeCustomization().handleLoadPackage(lpparam)
//移除锁屏负一屏功能
RemoveTheLeftSideOfTheLockScreen().handleLoadPackage(lpparam)
//TODO:状态栏天气
NotificationWeather().handleLoadPackage(lpparam)
//NotificationWeather().handleLoadPackage(lpparam)
//TODO状态栏电流
//StatusBarCurrent().handleLoadPackage(lpparam)
}
}

View File

@@ -0,0 +1,26 @@
package com.lt2333.simplicitytools.hook.app.systemui
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 RemoveTheLeftSideOfTheLockScreen : IXposedHookLoadPackage {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
val classIfExists = XposedHelpers.findClassIfExists(
"com.android.keyguard.negative.MiuiKeyguardMoveLeftViewContainer",
lpparam.classLoader
)
XposedHelpers.findAndHookMethod(
classIfExists,
"inflateLeftView",
object : XC_MethodHook() {
override fun beforeHookedMethod(param: MethodHookParam) {
if (XSPUtils.getBoolean("remove_the_left_side_of_the_lock_screen", false)) {
param.result = null
}
}
})
}
}

View File

@@ -92,4 +92,5 @@
<string name="tg_channel_summary">可在频道资料页进入交流群</string>
<string name="discussions">讨论</string>
<string name="remove_small_window_restrictions_summary">部分应用可能不支持手势进入小窗\n仅支持在后台任务界面长按进入</string>
<string name="remove_the_left_side_of_the_lock_screen">移除锁屏负一屏功能</string>
</resources>