mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 19:31:17 +08:00
新增允许不受信任的触摸
This commit is contained in:
@@ -974,6 +974,13 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
}.show()
|
}.show()
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
TextSummaryWithSwitch(
|
||||||
|
TextSummaryV(
|
||||||
|
textId = R.string.allow_untrusted_touches,
|
||||||
|
tipsId = R.string.take_effect_after_reboot
|
||||||
|
),
|
||||||
|
SwitchV("allow_untrusted_touches")
|
||||||
|
)
|
||||||
Line()
|
Line()
|
||||||
TitleText(resId = R.string.sound)
|
TitleText(resId = R.string.sound)
|
||||||
val mediaVolumeStepsSwitchBinding = GetDataBinding(
|
val mediaVolumeStepsSwitchBinding = GetDataBinding(
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ object Android : AppRegister() {
|
|||||||
RemoveSmallWindowRestrictions, //解除小窗限制
|
RemoveSmallWindowRestrictions, //解除小窗限制
|
||||||
MaxWallpaperScale, //壁纸缩放比例
|
MaxWallpaperScale, //壁纸缩放比例
|
||||||
SystemPropertiesHook, //SystemPropertiesHook
|
SystemPropertiesHook, //SystemPropertiesHook
|
||||||
|
AllowUntrustedTouches, //允许不受信任的触摸
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.lt2333.simplicitytools.hook.app.android
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.lt2333.simplicitytools.util.hasEnable
|
||||||
|
import com.lt2333.simplicitytools.util.hookBeforeMethod
|
||||||
|
import com.lt2333.simplicitytools.util.xposed.base.HookRegister
|
||||||
|
|
||||||
|
object AllowUntrustedTouches : HookRegister() {
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
hasEnable("allow_untrusted_touches") {
|
||||||
|
"android.hardware.input.InputManager".hookBeforeMethod(
|
||||||
|
getDefaultClassLoader(),
|
||||||
|
"getBlockUntrustedTouchesMode",
|
||||||
|
Context::class.java
|
||||||
|
) {
|
||||||
|
it.result = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -215,5 +215,8 @@
|
|||||||
<string name="rear_display">Rear Display (11Ultra)</string>
|
<string name="rear_display">Rear Display (11Ultra)</string>
|
||||||
<string name="lock_screen_clock_display_seconds">Clock display seconds</string>
|
<string name="lock_screen_clock_display_seconds">Clock display seconds</string>
|
||||||
<string name="sound">Sound</string>
|
<string name="sound">Sound</string>
|
||||||
<string name="media_volume_steps">Media volume steps (Take effect after reboot)</string>
|
<string name="media_volume_steps_switch">Media volume steps</string>
|
||||||
|
<string name="allow_untrusted_touches">Allow untrusted touches</string>
|
||||||
|
<string name="take_effect_after_reboot">Take effect after reboot</string>
|
||||||
|
<string name="media_volume_steps_summary">Turning on may cause the scrolling of the volume bar to freeze or the Bluetooth volume to be abnormal</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user