summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2013-06-13 18:04:28 -0700
committerEino-Ville Talvala <etalvala@google.com>2013-06-13 18:04:28 -0700
commit26bc908b3dafb5d80f092a22c5c71116526eae06 (patch)
treeebbd8e95bd3d1bb5ac73d8dcb6fbcdd2d412d653 /services
parent214a17fd37ef85fc841d3157b1e9096e1aa1b42f (diff)
downloadframeworks_av-26bc908b3dafb5d80f092a22c5c71116526eae06.zip
frameworks_av-26bc908b3dafb5d80f092a22c5c71116526eae06.tar.gz
frameworks_av-26bc908b3dafb5d80f092a22c5c71116526eae06.tar.bz2
Camera2/3: Make sure to wait for idle after still capture.
While this wait should be immediate, it's important to guarantee that preview is stopped when takePicture completes, and that the device knows itself to be idle. Bug: 9413025 Change-Id: I1c151ba920e226107ee048918187364990f444c0
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/camera2/CaptureSequencer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
index 266e516..e5a011c 100644
--- a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
+++ b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
@@ -253,6 +253,12 @@ CaptureSequencer::CaptureState CaptureSequencer::manageDone(sp<Camera2Client> &c
res = INVALID_OPERATION;
break;
case Parameters::STILL_CAPTURE:
+ res = client->getCameraDevice()->waitUntilDrained();
+ if (res != OK) {
+ ALOGE("%s: Camera %d: Can't idle after still capture: "
+ "%s (%d)", __FUNCTION__, client->getCameraId(),
+ strerror(-res), res);
+ }
l.mParameters.state = Parameters::STOPPED;
break;
case Parameters::VIDEO_SNAPSHOT: