diff options
-rw-r--r-- | media/java/android/media/ImageReader.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/java/android/media/ImageReader.java b/media/java/android/media/ImageReader.java index f3356c9..b14a899 100644 --- a/media/java/android/media/ImageReader.java +++ b/media/java/android/media/ImageReader.java @@ -194,7 +194,7 @@ public final class ImageReader implements AutoCloseable { Looper looper; mHandler = handler; - if (mHandler == null) { + if (listener != null && mHandler == null) { if ((looper = Looper.myLooper()) != null) { mHandler = new Handler(); } else { @@ -283,7 +283,7 @@ public final class ImageReader implements AutoCloseable { return; } - if (ir.mHandler != null) { + if (ir.mHandler != null && ir.mImageListener != null) { ir.mHandler.post(new Runnable() { @Override public void run() { |