Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6907e82c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7318334 from b9ff8acd to sc-release

Change-Id: I97ae62ef830843e28aade36c6fde6ddc33973943
parents d1f8832f b9ff8acd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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",
}
+5 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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);

+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);
}
+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