summaryrefslogtreecommitdiffstats
path: root/camera/Camera.cpp
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-01-04 20:00:55 +0800
committerWu-cheng Li <wuchengli@google.com>2011-01-05 13:14:30 +0800
commit627baacc748c5e2ed68bdb256aea4d70fcfe9ce4 (patch)
tree75e721e7eeead2df74880a9019d178f33f003477 /camera/Camera.cpp
parentc213b812514d16dd401cd308b9203b70bfbb3d5f (diff)
downloadframeworks_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
Diffstat (limited to 'camera/Camera.cpp')
-rw-r--r--camera/Camera.cpp3
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()