From 52018e5d81b209c3653e4ba79e0b6b0852bccefb Mon Sep 17 00:00:00 2001 From: duqingquan Date: Fri, 24 May 2024 12:37:53 +0800 Subject: [PATCH] =?UTF-8?q?native-page=20=E6=B6=88=E9=99=A4=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=99=A8=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utssdk/app-android/CustomAccessibilityService.uts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/uni_modules/uts-nativepage/utssdk/app-android/CustomAccessibilityService.uts b/uni_modules/uts-nativepage/utssdk/app-android/CustomAccessibilityService.uts index 873a5dc..de7daa3 100644 --- a/uni_modules/uts-nativepage/utssdk/app-android/CustomAccessibilityService.uts +++ b/uni_modules/uts-nativepage/utssdk/app-android/CustomAccessibilityService.uts @@ -15,13 +15,10 @@ export class CustomAccessibilityService extends AccessibilityService { override onAccessibilityEvent(event:AccessibilityEvent ):void { - if(event == null){ - return ; - } - console.log("packagename",event!.getPackageName()) - if("io.dcloud.uniappx" == event!.getPackageName()){ + console.log("packagename",event.getPackageName()) + if("io.dcloud.uniappx" == event.getPackageName()){ console.log("辅助服务消息:uniappx 基座打开") - }else if("io.dcloud.HBuilder" == event!.getPackageName()){ + }else if("io.dcloud.HBuilder" == event.getPackageName()){ console.log("辅助服务消息:HBuilder 基座被打开") } } -- GitLab