summaryrefslogtreecommitdiff
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorxianming wang <mingwax@codeaurora.org>2020-06-29 14:35:02 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2020-07-01 21:37:34 -0700
commit5156b2c80656e87c81fd48e4dca83c405f752fdc (patch)
tree1e93a2fe9164f8aec77f1dd19ddfaeac1ae97a14 /src/com/android/camera/CaptureModule.java
parent507efaee463c5d1fabd177f5136a26dc12851fac (diff)
Snapcam: Fix NullPointerException for Monkey test
Fix NullPointerException for Monkey test. Change-Id: Ibb79d038d52f296c0b5f919e776609288dc7b0eb
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 0e52a48c4..ff24a2171 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3188,7 +3188,9 @@ public class CaptureModule implements CameraModule, PhotoController,
}
}
} else {
- captureBuilder.addTarget(mVideoSnapshotImageReader.getSurface());
+ if(mVideoSnapshotImageReader != null) {
+ captureBuilder.addTarget(mVideoSnapshotImageReader.getSurface());
+ }
}
// send snapshot stream together with preview and video stream for snapshot request
// stream is the surface for the app