From 36597b241c59eba7e55d5150092947a748c5e9cb Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Fri, 20 Mar 2015 22:15:57 -0700 Subject: camera2: Enforce client eviction on user switch. Bug: 19186859 Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668 --- include/camera/ICameraService.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include/camera') diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h index c8d3d19..cad275e 100644 --- a/include/camera/ICameraService.h +++ b/include/camera/ICameraService.h @@ -51,6 +51,7 @@ public: SUPPORTS_CAMERA_API, CONNECT_LEGACY, SET_TORCH_MODE, + NOTIFY_SYSTEM_EVENT, }; enum { @@ -64,7 +65,18 @@ public: enum { CAMERA_HAL_API_VERSION_UNSPECIFIED = -1 - }; + }; + + /** + * Keep up-to-date with declarations in + * frameworks/base/services/core/java/com/android/server/camera/CameraService.java + * + * These event codes are intended to be used with the notifySystemEvent call. + */ + enum { + NO_EVENT = 0, + USER_SWITCHED, + }; public: DECLARE_META_INTERFACE(CameraService); @@ -148,6 +160,11 @@ public: */ virtual status_t setTorchMode(const String16& cameraId, bool enabled, const sp& clientBinder) = 0; + + /** + * Notify the camera service of a system event. Should only be called from system_server. + */ + virtual void notifySystemEvent(int eventId, int arg0) = 0; }; // ---------------------------------------------------------------------------- -- cgit v1.1