diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-01-04 20:00:55 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-01-05 13:14:30 +0800 |
commit | 0e73cdc9834c21df6363e7ed2b6acef5180b4dfc (patch) | |
tree | 91ef96c3915ff9ff45d75c6f086af495a7b406fe /libs/camera | |
parent | c91d8c3ea5d2a3a065f7d5074817689713ea6dda (diff) | |
download | frameworks_base-0e73cdc9834c21df6363e7ed2b6acef5180b4dfc.zip frameworks_base-0e73cdc9834c21df6363e7ed2b6acef5180b4dfc.tar.gz frameworks_base-0e73cdc9834c21df6363e7ed2b6acef5180b4dfc.tar.bz2 |
Camera::create should fail when it fails to connect the camera.
bug:3197565
Change-Id: I3439a25c06b00615e8257e6b3db85df081643643
Diffstat (limited to 'libs/camera')
-rw-r--r-- | libs/camera/Camera.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp index 450971d..ab626ad 100644 --- a/libs/camera/Camera.cpp +++ b/libs/camera/Camera.cpp @@ -80,8 +80,9 @@ sp<Camera> Camera::create(const sp<ICamera>& camera) c->mStatus = NO_ERROR; c->mCamera = camera; camera->asBinder()->linkToDeath(c); + return c; } - return c; + return 0; } void Camera::init() |