1/* 2 * Copyright (C) 2020 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.frameworks.cameraservice.service@2.1; 18 19import android.frameworks.cameraservice.common@2.0::Status; 20import android.frameworks.cameraservice.service@2.0::ICameraService; 21import android.frameworks.cameraservice.service@2.1::CameraStatusAndId; 22import android.frameworks.cameraservice.service@2.1::ICameraServiceListener; 23import android.frameworks.cameraservice.service@2.1::PhysicalCameraStatusAndId; 24 25interface ICameraService extends @2.0::ICameraService { 26 /** 27 * Add listener for changes to camera device status. 28 * 29 * Identical to @2.0::ICameraService.addListener, except that: 30 * 31 * - The listener now contains an onPhysicalCameraStatusChanged function, 32 * which is called by the camera service when a physical camera backing a 33 * logical multi-camera becomes unavailable or available again. 34 * - The function returns a vector of the newer version of CameraStatusAndId 35 * which contains unavailable physical cameras if the specified camera is a 36 * logical multi-camera. 37 * 38 * @param listener the listener interface to be added. The cameraserver will 39 * call callbacks on this interface when a camera device's status 40 * changes. 41 * @return status Status code of the operation 42 * @return statuses a list of CameraStatusAndIds which stores the deviceIds, 43 * their corresponding statuses, and the unavailable physical camera Ids 44 * if the device is a logical multi-camera. 45 */ 46 addListener_2_1(ICameraServiceListener listener) 47 generates (Status status, vec<CameraStatusAndId> statuses); 48}; 49