diff options
author | Zhijun He <zhijunhe@google.com> | 2013-08-27 16:02:21 -0700 |
---|---|---|
committer | Zhijun He <zhijunhe@google.com> | 2013-08-27 16:02:21 -0700 |
commit | e2a11bb74df06bb48a0d71b8cf78cc469b53931b (patch) | |
tree | 44bf651f4a8e1776dfc1f29d616a40e424ac14f6 /media | |
parent | ec566dd06f780c1a368d9472235e5d1fe3c3bda9 (diff) | |
download | frameworks_base-e2a11bb74df06bb48a0d71b8cf78cc469b53931b.zip frameworks_base-e2a11bb74df06bb48a0d71b8cf78cc469b53931b.tar.gz frameworks_base-e2a11bb74df06bb48a0d71b8cf78cc469b53931b.tar.bz2 |
ImageReader: Fix null listener case
Only do the handler check when listener is not null.
Bug: 10360518
Change-Id: I9940942ae95a492c92e028e5f862beea16e1da80
Diffstat (limited to 'media')
-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() { |