From 9a3b52427fed04a4bfb40b77615711df84bcb7d1 Mon Sep 17 00:00:00 2001 From: Pranav Pandey Date: Thu, 16 Jun 2022 16:54:50 +0530 Subject: [PATCH] Add more null checks for app monitor --- .../android/dynamic/engine/task/DynamicAppMonitor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dynamic-engine/src/main/java/com/pranavpandey/android/dynamic/engine/task/DynamicAppMonitor.java b/dynamic-engine/src/main/java/com/pranavpandey/android/dynamic/engine/task/DynamicAppMonitor.java index a717465..0f9acdd 100644 --- a/dynamic-engine/src/main/java/com/pranavpandey/android/dynamic/engine/task/DynamicAppMonitor.java +++ b/dynamic-engine/src/main/java/com/pranavpandey/android/dynamic/engine/task/DynamicAppMonitor.java @@ -190,7 +190,8 @@ protected void onCancelled() { * @param event The accessibility event. */ public void onAccessibilityEvent(@Nullable AccessibilityEvent event) { - if (!isRunning() || isPaused() || event == null) { + if (!isRunning() || isPaused() || event == null + || event.getPackageName() == null || event.getClassName() == null) { return; }