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 | 627baacc748c5e2ed68bdb256aea4d70fcfe9ce4 (patch) | |
tree | 75e721e7eeead2df74880a9019d178f33f003477 | |
parent | c213b812514d16dd401cd308b9203b70bfbb3d5f (diff) | |
download | frameworks_av-627baacc748c5e2ed68bdb256aea4d70fcfe9ce4.zip frameworks_av-627baacc748c5e2ed68bdb256aea4d70fcfe9ce4.tar.gz frameworks_av-627baacc748c5e2ed68bdb256aea4d70fcfe9ce4.tar.bz2 |
Camera::create should fail when it fails to connect the camera.
bug:3197565
Change-Id: I3439a25c06b00615e8257e6b3db85df081643643
-rw-r--r-- | camera/Camera.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp index 450971d..ab626ad 100644 --- a/camera/Camera.cpp +++ b/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() |