From 0e73cdc9834c21df6363e7ed2b6acef5180b4dfc Mon Sep 17 00:00:00 2001 From: Wu-cheng Li Date: Tue, 4 Jan 2011 20:00:55 +0800 Subject: Camera::create should fail when it fails to connect the camera. bug:3197565 Change-Id: I3439a25c06b00615e8257e6b3db85df081643643 --- libs/camera/Camera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/camera') 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::create(const sp& camera) c->mStatus = NO_ERROR; c->mCamera = camera; camera->asBinder()->linkToDeath(c); + return c; } - return c; + return 0; } void Camera::init() -- cgit v1.1