diff --git a/uni_modules/uts-nativepage/utssdk/app-android/CustomAccessibilityService.uts b/uni_modules/uts-nativepage/utssdk/app-android/CustomAccessibilityService.uts index 873a5dc546528c7ee158cdbf0803bba26827d078..de7daa3aa2f9a6efba9273ed385bf2b42bdb3f0e 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 基座被打开") } }