From c5c84baaf8dd9074ebac63f2068081407c0cadf7 Mon Sep 17 00:00:00 2001 From: Yin-Chia Yeh Date: Thu, 31 May 2018 12:14:14 -0700 Subject: [PATCH] Camera: add DISABLE error code Test: CTS CameraEvictionTest + IdleUidTest Bug: 77486868 Change-Id: I1411d6667776963435ce25bd643a33c41d224921 --- libsystem/include/system/camera.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libsystem/include/system/camera.h b/libsystem/include/system/camera.h index 5d0873ac4..7d796737c 100644 --- a/libsystem/include/system/camera.h +++ b/libsystem/include/system/camera.h @@ -203,6 +203,15 @@ enum { * (except disconnect and sending CAMERA_CMD_PING) after getting this. */ CAMERA_ERROR_RELEASED = 2, + + /** + * Camera was released because device policy change or the client application + * is going to background. The client should call Camera::disconnect + * immediately after getting this notification. Otherwise, the camera will be + * released by camera service in a short time. The client should not call any + * method (except disconnect and sending CAMERA_CMD_PING) after getting this. + */ + CAMERA_ERROR_DISABLED = 3, CAMERA_ERROR_SERVER_DIED = 100 };