From 9b698795dc27e04202d7c87ade3297e1ed13dcbf Mon Sep 17 00:00:00 2001 From: plusCubed Date: Sat, 5 Jan 2019 14:17:04 -0800 Subject: [PATCH] Fix accessibility crash --- .../velociraptor/detection/AppDetectionService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/pluscubed/velociraptor/detection/AppDetectionService.java b/app/src/main/java/com/pluscubed/velociraptor/detection/AppDetectionService.java index 1e606c4..e937cd9 100644 --- a/app/src/main/java/com/pluscubed/velociraptor/detection/AppDetectionService.java +++ b/app/src/main/java/com/pluscubed/velociraptor/detection/AppDetectionService.java @@ -71,7 +71,10 @@ public void onAccessibilityEvent(AccessibilityEvent event) { ); long eventTime = event.getEventTime(); - event.recycle(); + try { + event.recycle(); + } catch (Exception ignored) { + } boolean isActivity = componentName.getPackageName().toLowerCase().contains("activity") || tryGetActivity(componentName) != null;