Merge change 6084 into donut
* changes: Return CAMERA_ERROR_SERVER_DIED to camera app when camera service dies (bug 1956726)
This commit is contained in:
@@ -371,7 +371,7 @@ public class Camera {
|
|||||||
}
|
}
|
||||||
private native final void native_takePicture();
|
private native final void native_takePicture();
|
||||||
|
|
||||||
// These match the enum in libs/android_runtime/android_hardware_Camera.cpp
|
// These match the enum in include/ui/Camera.h
|
||||||
/** Unspecified camerar error. @see #ErrorCallback */
|
/** Unspecified camerar error. @see #ErrorCallback */
|
||||||
public static final int CAMERA_ERROR_UNKNOWN = 1;
|
public static final int CAMERA_ERROR_UNKNOWN = 1;
|
||||||
/** Media server died. In this case, the application must release the
|
/** Media server died. In this case, the application must release the
|
||||||
|
|||||||
@@ -38,12 +38,6 @@ enum CallbackMessageID {
|
|||||||
kErrorCallback = 5
|
kErrorCallback = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CameraError {
|
|
||||||
kCameraErrorUnknown = 1,
|
|
||||||
kCameraErrorMediaServer = 100
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct fields_t {
|
struct fields_t {
|
||||||
jfieldID context;
|
jfieldID context;
|
||||||
jfieldID surface;
|
jfieldID surface;
|
||||||
|
|||||||
@@ -76,6 +76,12 @@ enum {
|
|||||||
CAMERA_MSG_COMPRESSED_IMAGE
|
CAMERA_MSG_COMPRESSED_IMAGE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// camera fatal errors
|
||||||
|
enum {
|
||||||
|
CAMERA_ERROR_UKNOWN = 1,
|
||||||
|
CAMERA_ERROR_SERVER_DIED = 100
|
||||||
|
};
|
||||||
|
|
||||||
class ICameraService;
|
class ICameraService;
|
||||||
class ICamera;
|
class ICamera;
|
||||||
class Surface;
|
class Surface;
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ void Camera::dataCallback(int32_t msgType, const sp<IMemory>& dataPtr)
|
|||||||
|
|
||||||
void Camera::binderDied(const wp<IBinder>& who) {
|
void Camera::binderDied(const wp<IBinder>& who) {
|
||||||
LOGW("ICamera died");
|
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) {
|
void Camera::DeathNotifier::binderDied(const wp<IBinder>& who) {
|
||||||
|
|||||||
Reference in New Issue
Block a user