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

Commit 6a04bafa authored by Henry Fang's avatar Henry Fang Committed by Android (Google) Code Review
Browse files

Merge "catch null exception for filter event" into udc-dev

parents 3d2226d2 d3d570ac
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) {