diff options
author | Wu-cheng Li <wuchengli@google.com> | 2009-07-01 11:20:08 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-07-01 11:20:08 -0700 |
commit | 0795684839b60fc5e7edb14c301e7797b6645d05 (patch) | |
tree | 847d9538d5dd290d6cec29a00b3354206521c734 /libs/ui | |
parent | 9fa8914eac00fb4ecc68371824a4b1b47466c225 (diff) | |
parent | b8a10fe45657f2dcc50cae8a06805f8438a6937e (diff) | |
download | frameworks_base-0795684839b60fc5e7edb14c301e7797b6645d05.zip frameworks_base-0795684839b60fc5e7edb14c301e7797b6645d05.tar.gz frameworks_base-0795684839b60fc5e7edb14c301e7797b6645d05.tar.bz2 |
am b8a10fe4: Allow setPreviewDisplay after startPreview.
Merge commit 'b8a10fe45657f2dcc50cae8a06805f8438a6937e'
* commit 'b8a10fe45657f2dcc50cae8a06805f8438a6937e':
Allow setPreviewDisplay after startPreview.
Diffstat (limited to 'libs/ui')
-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 33b99b9..a72d2c9 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"); |