@@ -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