Loading apex/mediatranscoding.rc +1 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,5 @@ service media.transcoding /apex/com.android.media/bin/mediatranscoding ioprio rt 4 # Restrict to little cores only with system-background cpuset. writepid /dev/cpuset/system-background/tasks interface aidl media.transcoding disabled camera/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ filegroup { "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl", "aidl/android/hardware/camera2/ICameraDeviceUser.aidl", "aidl/android/hardware/camera2/ICameraOfflineSession.aidl", "aidl/android/hardware/camera2/ICameraInjectionCallback.aidl", "aidl/android/hardware/camera2/ICameraInjectionSession.aidl", ], path: "aidl", } Loading camera/aidl/android/hardware/ICameraService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.hardware.ICamera; import android.hardware.ICameraClient; import android.hardware.camera2.ICameraDeviceUser; import android.hardware.camera2.ICameraDeviceCallbacks; import android.hardware.camera2.ICameraInjectionCallback; import android.hardware.camera2.ICameraInjectionSession; import android.hardware.camera2.params.VendorTagDescriptor; import android.hardware.camera2.params.VendorTagDescriptorCache; import android.hardware.camera2.utils.ConcurrentCameraIdCombination; Loading Loading @@ -161,6 +163,9 @@ interface ICameraService boolean supportsCameraApi(String cameraId, int apiVersion); // Determines if a cameraId is a hidden physical camera of a logical multi-camera. boolean isHiddenPhysicalCamera(String cameraId); // Inject the external camera to replace the internal camera session. ICameraInjectionSession injectCamera(String packageName, String internalCamId, String externalCamId, in ICameraInjectionCallback CameraInjectionCallback); void setTorchMode(String cameraId, boolean enabled, IBinder clientBinder); Loading camera/aidl/android/hardware/camera2/ICameraInjectionCallback.aidl 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.camera2; import android.hardware.camera2.ICameraInjectionSession; /** * Binder interface used to call back the error state injected by the external camera, * and camera service can be switched back to internal camera when binder signals process death. * * @hide */ interface ICameraInjectionCallback { // Error codes for onInjectionError // To indicate all invalid error codes const int ERROR_INJECTION_INVALID_ERROR = -1; // To indicate the camera injection session has encountered a fatal error, such as injection // init failure, configure failure or injecting failure etc. const int ERROR_INJECTION_SESSION = 0; // To indicate the camera service has encountered a fatal error. const int ERROR_INJECTION_SERVICE = 1; // To indicate the injection camera does not support certain camera functions, such as // unsupport stream format, no capture/record function or no multi-camera function etc. // When this error occurs, the default processing is still in the inject state, and the app is // notified to display an error message and a black screen. const int ERROR_INJECTION_UNSUPPORTED = 2; oneway void onInjectionError(int errorCode); } camera/aidl/android/hardware/camera2/ICameraInjectionSession.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.camera2; /** @hide */ interface ICameraInjectionSession { oneway void stopInjection(); } Loading
apex/mediatranscoding.rc +1 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,5 @@ service media.transcoding /apex/com.android.media/bin/mediatranscoding ioprio rt 4 # Restrict to little cores only with system-background cpuset. writepid /dev/cpuset/system-background/tasks interface aidl media.transcoding disabled
camera/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ filegroup { "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl", "aidl/android/hardware/camera2/ICameraDeviceUser.aidl", "aidl/android/hardware/camera2/ICameraOfflineSession.aidl", "aidl/android/hardware/camera2/ICameraInjectionCallback.aidl", "aidl/android/hardware/camera2/ICameraInjectionSession.aidl", ], path: "aidl", } Loading
camera/aidl/android/hardware/ICameraService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.hardware.ICamera; import android.hardware.ICameraClient; import android.hardware.camera2.ICameraDeviceUser; import android.hardware.camera2.ICameraDeviceCallbacks; import android.hardware.camera2.ICameraInjectionCallback; import android.hardware.camera2.ICameraInjectionSession; import android.hardware.camera2.params.VendorTagDescriptor; import android.hardware.camera2.params.VendorTagDescriptorCache; import android.hardware.camera2.utils.ConcurrentCameraIdCombination; Loading Loading @@ -161,6 +163,9 @@ interface ICameraService boolean supportsCameraApi(String cameraId, int apiVersion); // Determines if a cameraId is a hidden physical camera of a logical multi-camera. boolean isHiddenPhysicalCamera(String cameraId); // Inject the external camera to replace the internal camera session. ICameraInjectionSession injectCamera(String packageName, String internalCamId, String externalCamId, in ICameraInjectionCallback CameraInjectionCallback); void setTorchMode(String cameraId, boolean enabled, IBinder clientBinder); Loading
camera/aidl/android/hardware/camera2/ICameraInjectionCallback.aidl 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.camera2; import android.hardware.camera2.ICameraInjectionSession; /** * Binder interface used to call back the error state injected by the external camera, * and camera service can be switched back to internal camera when binder signals process death. * * @hide */ interface ICameraInjectionCallback { // Error codes for onInjectionError // To indicate all invalid error codes const int ERROR_INJECTION_INVALID_ERROR = -1; // To indicate the camera injection session has encountered a fatal error, such as injection // init failure, configure failure or injecting failure etc. const int ERROR_INJECTION_SESSION = 0; // To indicate the camera service has encountered a fatal error. const int ERROR_INJECTION_SERVICE = 1; // To indicate the injection camera does not support certain camera functions, such as // unsupport stream format, no capture/record function or no multi-camera function etc. // When this error occurs, the default processing is still in the inject state, and the app is // notified to display an error message and a black screen. const int ERROR_INJECTION_UNSUPPORTED = 2; oneway void onInjectionError(int errorCode); }
camera/aidl/android/hardware/camera2/ICameraInjectionSession.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.camera2; /** @hide */ interface ICameraInjectionSession { oneway void stopInjection(); }