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

Commit 209bc063 authored by Biswarup Pal's avatar Biswarup Pal
Browse files

Remove unused VirtualCameraMetadata

Test: atest CtsVirtualDevicesCameraTestCases,
VirtualCameraControllerTest
Bug: 310857519

Change-Id: If4bf0f73876745320d686d960217cbfda154241c
parent 64a6d862
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -3350,7 +3350,7 @@ package android.companion.virtual.camera {
  }
  @FlaggedApi("android.companion.virtual.flags.virtual_camera") public interface VirtualCameraCallback {
    method public void onProcessCaptureRequest(int, long, @Nullable android.companion.virtual.camera.VirtualCameraMetadata);
    method public default void onProcessCaptureRequest(int, long);
    method public void onStreamClosed(int);
    method public void onStreamConfigured(int, @NonNull android.view.Surface, @NonNull android.companion.virtual.camera.VirtualCameraStreamConfig);
  }
@@ -3371,12 +3371,6 @@ package android.companion.virtual.camera {
    method @NonNull public android.companion.virtual.camera.VirtualCameraConfig.Builder setVirtualCameraCallback(@NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.camera.VirtualCameraCallback);
  }
  @FlaggedApi("android.companion.virtual.flags.virtual_camera") public final class VirtualCameraMetadata implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.companion.virtual.camera.VirtualCameraMetadata> CREATOR;
  }
  @FlaggedApi("android.companion.virtual.flags.virtual_camera") public final class VirtualCameraStreamConfig implements android.os.Parcelable {
    ctor public VirtualCameraStreamConfig(@IntRange(from=1) int, @IntRange(from=1) int, int);
    method public int describeContents();
+7 −10
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 * Copyright 2023 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.
@@ -16,11 +16,11 @@
package android.companion.virtual.camera;

import android.companion.virtual.camera.VirtualCameraStreamConfig;
import android.companion.virtual.camera.VirtualCameraMetadata;
import android.view.Surface;

/**
 * Interface for the virtual camera service and system server to talk back to the virtual camera owner.
 * Interface for the virtual camera service and system server to talk back to the virtual camera
 * owner.
 *
 * @hide
 */
@@ -40,8 +40,7 @@ interface IVirtualCameraCallback {
            in VirtualCameraStreamConfig streamConfig);

    /**
     * The client application is requesting a camera frame for the given streamId with the provided
     * metadata.
     * The client application is requesting a camera frame for the given streamId and frameId.
     *
     * <p>The virtual camera needs to write the frame data in the {@link Surface} corresponding to
     * this stream that was provided during the {@link #onStreamConfigured(int, Surface,
@@ -52,16 +51,14 @@ interface IVirtualCameraCallback {
     *     VirtualCameraStreamConfig)}
     * @param frameId The frameId that is being requested. Each request will have a different
     *     frameId, that will be increasing for each call with a particular streamId.
     * @param metadata The metadata requested for the frame. The virtual camera should do its best
     *     to honor the requested metadata.
     */
    oneway void onProcessCaptureRequest(
            int streamId, long frameId, in VirtualCameraMetadata metadata);
    oneway void onProcessCaptureRequest(int streamId, long frameId);

    /**
     * The stream previously configured when {@link #onStreamConfigured(int, Surface,
     * VirtualCameraStreamConfig)} was called is now being closed and associated resources can be
     * freed. The Surface was disposed on the client side and should not be used anymore by the virtual camera owner
     * freed. The Surface was disposed on the client side and should not be used anymore by the
     * virtual camera owner.
     *
     * @param streamId The id of the stream that was closed.
     */
+3 −9
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 * Copyright 2023 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.
@@ -18,7 +18,6 @@ package android.companion.virtual.camera;

import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.companion.virtual.flags.Flags;
import android.view.Surface;
@@ -50,8 +49,7 @@ public interface VirtualCameraCallback {
            @NonNull VirtualCameraStreamConfig streamConfig);

    /**
     * The client application is requesting a camera frame for the given streamId with the provided
     * metadata.
     * The client application is requesting a camera frame for the given streamId and frameId.
     *
     * <p>The virtual camera needs to write the frame data in the {@link Surface} corresponding to
     * this stream that was provided during the {@link #onStreamConfigured(int, Surface,
@@ -62,12 +60,8 @@ public interface VirtualCameraCallback {
     *     VirtualCameraStreamConfig)}
     * @param frameId The frameId that is being requested. Each request will have a different
     *     frameId, that will be increasing for each call with a particular streamId.
     * @param metadata The metadata requested for the frame. The virtual camera should do its best
     *     to honor the requested metadata but the consumer won't be informed about the metadata set
     *     for a particular frame. If null, the requested frame can be anything the producer sends.
     */
    void onProcessCaptureRequest(
            int streamId, long frameId, @Nullable VirtualCameraMetadata metadata);
    default void onProcessCaptureRequest(int streamId, long frameId) {}

    /**
     * The stream previously configured when {@link #onStreamConfigured(int, Surface,
+3 −4
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 * Copyright 2023 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.
@@ -224,9 +224,8 @@ public final class VirtualCameraConfig implements Parcelable {
        }

        @Override
        public void onProcessCaptureRequest(
                int streamId, long frameId, VirtualCameraMetadata metadata) {
            mExecutor.execute(() -> mCallback.onProcessCaptureRequest(streamId, frameId, metadata));
        public void onProcessCaptureRequest(int streamId, long frameId) {
            mExecutor.execute(() -> mCallback.onProcessCaptureRequest(streamId, frameId));
        }

        @Override
+0 −24
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 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.companion.virtual.camera;

/**
 * Data structure used to store {@link android.hardware.camera2.CameraMetadata} compatible with
 * VirtualCamera.
 * @hide
 */
parcelable VirtualCameraMetadata;
Loading