summaryrefslogtreecommitdiffstats
path: root/libs/camera
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
commit0e73cdc9834c21df6363e7ed2b6acef5180b4dfc (patch)
tree91ef96c3915ff9ff45d75c6f086af495a7b406fe /libs/camera
parentc91d8c3ea5d2a3a065f7d5074817689713ea6dda (diff)
downloadframeworks_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.cpp3
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()