Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e864fa2 authored by Henry Fang's avatar Henry Fang Committed by Automerger Merge Worker
Browse files

Merge "catch null exception for filter event" into udc-dev am: 6a04bafa

parents 9b2ea1d5 6a04bafa
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.util.Log;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.NullPointerException;
import java.util.concurrent.Executor;

/**
@@ -271,8 +272,13 @@ public class Filter implements AutoCloseable {
                mExecutor.execute(() -> {
                    synchronized (mCallbackLock) {
                        if (mCallback != null) {
                            try {
                                mCallback.onFilterStatusChanged(this, status);
                            }
                            catch (NullPointerException e) {
                                Log.d(TAG, "catch exception:" + e);
                            }
                        }
                    }
                });
            }
@@ -285,7 +291,12 @@ public class Filter implements AutoCloseable {
                mExecutor.execute(() -> {
                    synchronized (mCallbackLock) {
                        if (mCallback != null) {
                            try {
                                mCallback.onFilterEvent(this, events);
                            }
                            catch (NullPointerException e) {
                                Log.d(TAG, "catch exception:" + e);
                            }
                        } else {
                            for (FilterEvent event : events) {
                                if (event instanceof MediaEvent) {