@@ -9,7 +9,7 @@ import helperBridge from '@/system/helperBridge';
99import { mlkitOcr } from '@/system/Ocr/MlkitOcr' ;
1010import { mlkitOcr2 } from '@/system/Ocr/MlkitOcr2' ;
1111import { yunxiOcr } from '@/system/Ocr/YunxiOcr' ;
12- // import { myShell } from '@/system/MyAutomator';
12+ import { myShell } from '@/system/MyAutomator' ;
1313import pushClients from '@/system/PushClient/index' ;
1414import { AbstractPushClient } from '../PushClient/AbstractPushClient' ;
1515
@@ -151,19 +151,19 @@ export default function webviewSettigns() {
151151 } ) ;
152152 }
153153
154- // if (device.sdkInt >= 31 && isRoot) { // 安卓12,有root
155- // // 不受信任触摸事件
156- // const unTrunstedTouchStatus = myShell.execAndWaitFor('settings get global block_untrusted_touches');
157- // if (typeof unTrunstedTouchStatus !== 'undefined') {
158- // console.log('unTrunstedTouchStatus', unTrunstedTouchStatus);
159- // ret.push({
160- // desc: '允许不受信任触摸的事件穿透',
161- // name: 'unTrunstedTouchStatus',
162- // type: 'autojs_inner_setting_unTrunstedTouchStatus',
163- // enabled: 0 === parseInt(unTrunstedTouchStatus) ? true : false
164- // });
165- // }
166- // }
154+ if ( device . sdkInt >= 31 && isRoot ) { // 安卓12,有root
155+ // 不受信任触摸事件
156+ const unTrunstedTouchStatus = myShell . execAndWaitFor ( 'settings get global block_untrusted_touches' ) ;
157+ if ( typeof unTrunstedTouchStatus !== 'undefined' ) {
158+ console . log ( 'unTrunstedTouchStatus' , unTrunstedTouchStatus ) ;
159+ ret . push ( {
160+ desc : '允许不受信任触摸的事件穿透' ,
161+ name : 'unTrunstedTouchStatus' ,
162+ type : 'autojs_inner_setting_unTrunstedTouchStatus' ,
163+ enabled : 0 === parseInt ( unTrunstedTouchStatus ) ? true : false
164+ } ) ;
165+ }
166+ }
167167
168168 ret = [ ...ret , {
169169 desc : '悬浮选择方案后是否直接启动脚本' ,
@@ -402,14 +402,14 @@ export default function webviewSettigns() {
402402 // done(true);
403403 // });
404404 }
405- // } else if ('autojs_inner_setting_unTrunstedTouchStatus' === item.type) {
406- // if (item.enabled) {
407- // myShell.execAndWaitFor('settings put global block_untrusted_touches 0');
408- // done(true);
409- // } else {
410- // toastLog('请勿关闭允许不受信任触摸的事件穿透');
411- // done(false);
412- // }
405+ } else if ( 'autojs_inner_setting_unTrunstedTouchStatus' === item . type ) {
406+ if ( item . enabled ) {
407+ myShell . execAndWaitFor ( 'settings put global block_untrusted_touches 0' ) ;
408+ done ( true ) ;
409+ } else {
410+ toastLog ( '请勿关闭允许不受信任触摸的事件穿透' ) ;
411+ done ( false ) ;
412+ }
413413 } else if ( 'assttyys_setting' === item . type ) {
414414 const storeSettings = storeCommon . get ( 'settings' , { } ) ;
415415 if ( ( item . stype || 'switch' ) === 'switch' ) {
0 commit comments