summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author James Dong <jdong@google.com> 2009-07-02 10:04:20 -0700
committer James Dong <jdong@google.com> 2009-07-02 10:04:20 -0700
commit16f3d35459a03bf7fad41df0a0d192d2c50a0594 (patch)
tree5f417649d10b986df42f7851b3b67541f75632d9
parentbdfffcc0c265350a1d4fa79f0bc12a5b8606fde1 (diff)
Return CAMERA_ERROR_SERVER_DIED to camera app when camera service dies (bug 1956726)
-rw-r--r--include/ui/Camera.h6
-rw-r--r--libs/ui/Camera.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/include/ui/Camera.h b/include/ui/Camera.h
index 97e0e90df5..e3544ab0f1 100644
--- a/include/ui/Camera.h
+++ b/include/ui/Camera.h
@@ -76,6 +76,12 @@ enum {
CAMERA_MSG_COMPRESSED_IMAGE
};
+// camera fatal errors
+enum {
+ CAMERA_ERROR_UKNOWN = 1,
+ CAMERA_ERROR_SERVER_DIED = 100
+};
+
class ICameraService;
class ICamera;
class Surface;
diff --git a/libs/ui/Camera.cpp b/libs/ui/Camera.cpp
index a481ce7045..975594f39e 100644
--- a/libs/ui/Camera.cpp
+++ b/libs/ui/Camera.cpp
@@ -312,7 +312,7 @@ void Camera::dataCallback(int32_t msgType, const sp<IMemory>& dataPtr)
void Camera::binderDied(const wp<IBinder>& who) {
LOGW("ICamera died");
- notifyCallback(CAMERA_MSG_ERROR, DEAD_OBJECT, 0);
+ notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_SERVER_DIED, 0);
}
void Camera::DeathNotifier::binderDied(const wp<IBinder>& who) {