Skip to content

Commit 88d694f

Browse files
committed
修复: 手势二次确认
1 parent 03bc57e commit 88d694f

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/navigation/HideNavigationBar.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@ protected void before(MethodHookParam param) {
4747
new MethodHook() {
4848
@Override
4949
protected void before(MethodHookParam param) {
50-
View navView = (View) param.thisObject;
51-
boolean misTouch;
52-
boolean setting = Settings.Global.getInt(navView.getContext().getContentResolver(), "show_mistake_touch_toast", 1) == 0;
53-
if (setting) {
54-
param.setResult(setting);
55-
return;
56-
}
5750
// boolean mIsShowStatusBar = (boolean) XposedHelpers.callMethod(param.thisObject, "isImmersive");
58-
misTouch = (boolean) XposedHelpers.callMethod(param.thisObject, "isLandScapeActually");
59-
param.setResult(misTouch);
51+
/*boolean mIsShowNavBar = XposedHelpers.getBooleanField(param.thisObject, "mIsShowNavBar");
52+
boolean mHideGestureLine = XposedHelpers.getBooleanField(param.thisObject, "mHideGestureLine");
53+
boolean mIsShowStatusBar = XposedHelpers.getBooleanField(param.thisObject, "mIsShowStatusBar");
54+
logE(TAG, "mIsShowNavBar: " + mIsShowNavBar);
55+
logE(TAG, "mHideGestureLine: " + mHideGestureLine);
56+
logE(TAG, "mIsShowStatusBar: " + mIsShowStatusBar);*/
57+
// 按道理仅横屏时显示也是可以的,不知道为什么小米要判断这么多。
58+
View navView = (View) param.thisObject;
59+
boolean setting = Settings.Global.getInt(navView.getContext().getContentResolver(), "show_mistake_touch_toast", 1) == 1;
60+
boolean misTouch = (boolean) XposedHelpers.callMethod(param.thisObject, "isLandScapeActually");
61+
param.setResult(misTouch && setting);
6062
}
6163
}
6264
);

0 commit comments

Comments
 (0)