diff options
author | 2009-07-01 11:20:08 -0700 | |
---|---|---|
committer | 2009-07-01 11:20:08 -0700 | |
commit | cd998742c3b439eff94683e236c09c70c9729ecf (patch) | |
tree | ced08bb77259f4c9fadc00c1f9dab38e9d889994 /libs/ui/Camera.cpp | |
parent | 5c670fbc50a5eaf5615fbff48cdf82a84d8059e3 (diff) | |
parent | 988fb62884c108e487a39ef03f0873f74525a9c8 (diff) |
am b8a10fe4: Allow setPreviewDisplay after startPreview.
Merge commit 'b8a10fe45657f2dcc50cae8a06805f8438a6937e'
* commit 'b8a10fe45657f2dcc50cae8a06805f8438a6937e':
Allow setPreviewDisplay after startPreview.
Diffstat (limited to 'libs/ui/Camera.cpp')
-rw-r--r-- | libs/ui/Camera.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ui/Camera.cpp b/libs/ui/Camera.cpp index 33b99b99f8..a72d2c91b7 100644 --- a/libs/ui/Camera.cpp +++ b/libs/ui/Camera.cpp @@ -149,21 +149,21 @@ status_t Camera::unlock() status_t Camera::setPreviewDisplay(const sp<Surface>& surface) { LOGV("setPreviewDisplay"); - if (surface == 0) { - LOGE("app passed NULL surface"); - return NO_INIT; - } sp <ICamera> c = mCamera; if (c == 0) return NO_INIT; - return c->setPreviewDisplay(surface->getISurface()); + if (surface != 0) { + return c->setPreviewDisplay(surface->getISurface()); + } else { + LOGD("app passed NULL surface"); + return c->setPreviewDisplay(0); + } } status_t Camera::setPreviewDisplay(const sp<ISurface>& surface) { LOGV("setPreviewDisplay"); if (surface == 0) { - LOGE("app passed NULL surface"); - return NO_INIT; + LOGD("app passed NULL surface"); } sp <ICamera> c = mCamera; if (c == 0) return NO_INIT; @@ -171,7 +171,7 @@ status_t Camera::setPreviewDisplay(const sp<ISurface>& surface) } -// start preview mode, must call setPreviewDisplay first +// start preview mode status_t Camera::startPreview() { LOGV("startPreview"); |