summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2013-08-28 02:22:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-28 02:22:37 +0000
commit5b6ce5a2921caa63481630f877356e5678ee9ffa (patch)
tree40d8072de3a469be5243ec152d5e56c08d514f3b /media
parentae73139f37a34cb4cc51255cc15cd19fbc11416a (diff)
parente2a11bb74df06bb48a0d71b8cf78cc469b53931b (diff)
downloadframeworks_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.java4
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() {