diff options
author | Zhijun He <zhijunhe@google.com> | 2013-08-28 02:22:36 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-28 02:22:37 +0000 |
commit | 5b6ce5a2921caa63481630f877356e5678ee9ffa (patch) | |
tree | 40d8072de3a469be5243ec152d5e56c08d514f3b /media | |
parent | ae73139f37a34cb4cc51255cc15cd19fbc11416a (diff) | |
parent | e2a11bb74df06bb48a0d71b8cf78cc469b53931b (diff) | |
download | frameworks_base-5b6ce5a2921caa63481630f877356e5678ee9ffa.zip frameworks_base-5b6ce5a2921caa63481630f877356e5678ee9ffa.tar.gz frameworks_base-5b6ce5a2921caa63481630f877356e5678ee9ffa.tar.bz2 |
Merge "ImageReader: Fix null listener case" into klp-dev
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() { |