blob: dcd69b042cf03a352056e6bc2ae6bf3212b040e0 [file] [log] [blame]
Eino-Ville Talvalad56db1d2015-12-17 16:50:35 -08001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware;
18
Shuzhen Wang316781a2020-08-18 18:11:01 -070019import android.hardware.CameraSessionStats;
Avichal Rakesh6e57a2b2023-05-01 17:53:37 -070020import android.hardware.CameraExtensionSessionStats;
Shuzhen Wang316781a2020-08-18 18:11:01 -070021
Eino-Ville Talvalad56db1d2015-12-17 16:50:35 -080022/**
23 * Binder interface for the camera service proxy running in system_server.
24 *
Eino-Ville Talvalad56db1d2015-12-17 16:50:35 -080025 * @hide
26 */
27interface ICameraServiceProxy
28{
29 /**
30 * Ping the service proxy to update the valid users for the camera service.
31 */
32 oneway void pingForUserUpdate();
33
Emilian Peev573291c2018-02-10 02:10:56 +000034
35 /**
Eino-Ville Talvalae8c96c72017-06-27 12:24:07 -070036 * Update the status of a camera device.
37 */
Shuzhen Wang316781a2020-08-18 18:11:01 -070038 oneway void notifyCameraState(in CameraSessionStats cameraSessionStats);
Emilian Peevb91f1802021-03-23 14:50:28 -070039
40 /**
Emilian Peev5368ebf2021-10-08 17:52:18 -070041 * Returns the necessary rotate and crop override for the top activity which
42 * will be one of ({@link android.hardware.camera2.CameraMetadata#SCALER_ROTATE_AND_CROP_NONE},
43 * {@link android.hardware.camera2.CameraMetadata#SCALER_ROTATE_AND_CROP_90},
44 * {@link android.hardware.camera2.CameraMetadata#SCALER_ROTATE_AND_CROP_180},
45 * {@link android.hardware.camera2.CameraMetadata#SCALER_ROTATE_AND_CROP_270}).
Emilian Peevb91f1802021-03-23 14:50:28 -070046 */
Austin Borger1c1bee02023-06-01 16:51:35 -070047 int getRotateAndCropOverride(@utf8InCpp String packageName, int lensFacing, int userId);
Austin Borger5f7abe22022-04-26 15:55:10 -070048
49 /**
Bharatt Kukreja7146ced2022-10-25 15:45:29 +000050 * Returns the necessary autoframing override for the top activity which
51 * will be one of ({@link android.hardware.camera2.CameraMetadata#AUTOFRAMING_FALSE},
52 * {@link android.hardware.camera2.CameraMetadata#AUTOFRAMING_TRUE}).
53 */
Austin Borger1c1bee02023-06-01 16:51:35 -070054 int getAutoframingOverride(@utf8InCpp String packageName);
Bharatt Kukreja7146ced2022-10-25 15:45:29 +000055
56 /**
Austin Borger5f7abe22022-04-26 15:55:10 -070057 * Checks if the camera has been disabled via device policy.
58 */
Austin Borger9bfa0a72022-08-03 17:50:40 -070059 boolean isCameraDisabled(int userId);
Eino-Ville Talvalad56db1d2015-12-17 16:50:35 -080060}