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

Commit 98b65e04 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12710726 from f76f57f1 to 25Q1-release

Change-Id: Iffbf71b16f217fa599eb176c4a3e838e82212d75
parents 64aaa23a f76f57f1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -82,6 +82,8 @@ cc_library {
        include_dirs: [
            "frameworks/native/aidl/gui",
            "frameworks/native/libs/permission/aidl",
            "hardware/interfaces/common/fmq/aidl",
            "hardware/interfaces/common/aidl",
        ],
    },

@@ -112,6 +114,8 @@ cc_library {
    ],

    shared_libs: [
        "android.hardware.common.fmq-V1-cpp",
        "android.hardware.common-V2-cpp",
        "camera_platform_flags_c_lib",
        "framework-permission-aidl-cpp",
        "lib-platform-compat-native-api",
@@ -136,6 +140,8 @@ cc_library {
    ],
    export_shared_lib_headers: [
        "framework-permission-aidl-cpp",
        "android.hardware.common.fmq-V1-cpp",
        "android.hardware.common-V2-cpp",
        "libcamera_metadata",
        "libgui",
        "libnativewindow",
@@ -187,6 +193,7 @@ filegroup {
        "aidl/android/hardware/camera2/ICameraInjectionCallback.aidl",
        "aidl/android/hardware/camera2/ICameraInjectionSession.aidl",
        "aidl/android/hardware/camera2/ICameraOfflineSession.aidl",
        "aidl/android/hardware/camera2/CameraMetadataInfo.aidl",
    ],
    path: "aidl",
}
+11 −22
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ status_t PhysicalCaptureResultInfo::readFromParcel(const android::Parcel* parcel
    status_t res;

    mPhysicalCameraId = "";
    mPhysicalCameraMetadata.clear();

    String16 physicalCameraId;
    if ((res = parcel->readString16(&physicalCameraId)) != OK) {
@@ -107,10 +106,11 @@ status_t PhysicalCaptureResultInfo::readFromParcel(const android::Parcel* parcel
    }
    mPhysicalCameraId = toStdString(physicalCameraId);

    if ((res = mPhysicalCameraMetadata.readFromParcel(parcel)) != OK) {
    if ((res = mCameraMetadataInfo.readFromParcel(parcel)) != OK) {
        ALOGE("%s: Failed to read metadata from parcel: %d", __FUNCTION__, res);
        return res;
    }

    return OK;
}

@@ -121,11 +121,13 @@ status_t PhysicalCaptureResultInfo::writeToParcel(android::Parcel* parcel) const
                __FUNCTION__, res);
        return res;
    }
    if ((res = mPhysicalCameraMetadata.writeToParcel(parcel)) != OK) {

    if ((res = mCameraMetadataInfo.writeToParcel(parcel)) != OK) {
        ALOGE("%s: Failed to write physical camera metadata to parcel: %d",
                __FUNCTION__, res);
        return res;
    }

    return OK;
}

@@ -178,20 +180,12 @@ status_t CaptureResult::readFromParcel(android::Parcel *parcel) {
    }

    for (int32_t i = 0; i < physicalMetadataCount; i++) {
        String16 cameraId;
        if ((res = parcel->readString16(&cameraId)) != OK) {
            ALOGE("%s: Failed to read camera id: %d", __FUNCTION__, res);
            return res;
        }

        CameraMetadata physicalMetadata;
        if ((res = physicalMetadata.readFromParcel(parcel)) != OK) {
            ALOGE("%s: Failed to read metadata from parcel: %d", __FUNCTION__, res);
        PhysicalCaptureResultInfo result;
        if ((res = result.readFromParcel(parcel)) != OK) {
            ALOGE("%s: Failed to read physical result from parcel: %d", __FUNCTION__, res);
            return res;
        }

        mPhysicalMetadatas.emplace(mPhysicalMetadatas.end(), toStdString(cameraId),
                physicalMetadata);
        mPhysicalMetadatas.emplace(mPhysicalMetadatas.end(), result);
    }
    ALOGV("%s: Read physical metadata from parcel", __FUNCTION__);

@@ -232,13 +226,8 @@ status_t CaptureResult::writeToParcel(android::Parcel *parcel) const {
        return BAD_VALUE;
    }
    for (const auto& physicalMetadata : mPhysicalMetadatas) {
        if ((res = parcel->writeString16(toString16(physicalMetadata.mPhysicalCameraId))) != OK) {
            ALOGE("%s: Failed to write physical camera ID to parcel: %d",
                    __FUNCTION__, res);
            return res;
        }
        if ((res = physicalMetadata.mPhysicalCameraMetadata.writeToParcel(parcel)) != OK) {
            ALOGE("%s: Failed to write physical camera metadata to parcel: %d",
        if ((res = physicalMetadata.writeToParcel(parcel)) != OK) {
            ALOGE("%s: Failed to write physicalMetadata to parcel: %d",
                    __FUNCTION__, res);
            return res;
        }
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.impl.CameraMetadataNative;

/** @hide */
union CameraMetadataInfo {
    long fmqSize;
    CameraMetadataNative metadata;
}
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.hardware.camera2;

import android.hardware.camera2.CameraMetadataInfo;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.CaptureResultExtras;
import android.hardware.camera2.impl.PhysicalCaptureResultInfo;
@@ -36,7 +37,7 @@ interface ICameraDeviceCallbacks
    oneway void onDeviceError(int errorCode, in CaptureResultExtras resultExtras);
    oneway void onDeviceIdle();
    oneway void onCaptureStarted(in CaptureResultExtras resultExtras, long timestamp);
    oneway void onResultReceived(in CameraMetadataNative result,
    oneway void onResultReceived(in CameraMetadataInfo resultInfo,
                                 in CaptureResultExtras resultExtras,
                                 in PhysicalCaptureResultInfo[] physicalCaptureResultInfos);
    oneway void onPrepared(int streamId);
+3 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.params.OutputConfiguration;
import android.hardware.camera2.params.SessionConfiguration;
import android.hardware.camera2.utils.SubmitInfo;
import android.hardware.common.fmq.MQDescriptor;
import android.hardware.common.fmq.SynchronizedReadWrite;
import android.view.Surface;

/** @hide */
@@ -173,6 +175,7 @@ interface ICameraDeviceUser

    void finalizeOutputConfigurations(int streamId, in OutputConfiguration outputConfiguration);

    MQDescriptor<byte, SynchronizedReadWrite> getCaptureResultMetadataQueue();

    // Keep in sync with public API in
    // frameworks/base/core/java/android/hardware/camera2/CameraDevice.java
Loading