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

Commit 3af53cea authored by Changyeon Jo's avatar Changyeon Jo Committed by Android (Google) Code Review
Browse files

Merge "Add a method to support multi-display usages"

parents 460b9610 043a7a02
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10,9 +10,11 @@ hidl_interface {
        "types.hal",
        "IEvsCamera.hal",
        "IEvsCameraStream.hal",
        "IEvsDisplay.hal",
        "IEvsEnumerator.hal",
    ],
    interfaces: [
        "android.frameworks.automotive.display@1.0",
        "android.hardware.automotive.evs@1.0",
        "android.hardware.camera.device@3.2",
        "android.hardware.graphics.common@1.0",
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 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.automotive.evs@1.1;

import @1.0::IEvsDisplay;
import @1.0::EvsResult;
import android.frameworks.automotive.display@1.0::HwDisplayConfig;
import android.frameworks.automotive.display@1.0::HwDisplayState;

/**
 * Represents a single display.
 */
interface IEvsDisplay extends @1.0::IEvsDisplay {
    /**
     * Returns the description of this display.
     *
     * @return cfg   Current configuration of this display.
     * @return state Current state of this display.
     */
    getDisplayInfo_1_1() generates (HwDisplayConfig cfg, HwDisplayState state);
};
+22 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.automotive.evs@1.1;

import IEvsCamera;
import IEvsDisplay;
import @1.0::IEvsEnumerator;
import @1.0::EvsResult;
import android.hardware.camera.device@3.2::Stream;
@@ -54,4 +55,25 @@ interface IEvsEnumerator extends @1.0::IEvsEnumerator {
     * @return result False for EVS manager implementations and true for all others.
     */
    isHardware() generates (bool result);

    /**
     * Returns a list of all EVS displays available to the system
     *
     * @return displayIds Identifiers of available displays.
     */
    getDisplayIdList() generates (vec<uint8_t> displayIds);

    /**
     * Get exclusive access to IEvsDisplay for the system
     *
     * There can be more than one EVS display objects for the system and this function
     * requests access to the display identified by a given ID. If the target EVS display
     * is not available or is already in use the old instance shall be closed and give
     * the new caller exclusive access.
     * When done using the display, the caller may release it by calling closeDisplay().
     *
     * @param  id      Target display identifier.
     * @return display EvsDisplay object to be used.
     */
    openDisplay_1_1(uint8_t id) generates (IEvsDisplay display);
};
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@ cc_binary {
        "libutils",
        "libcamera_metadata",
        "libtinyxml2",
        "android.hidl.token@1.0-utils",
        "android.frameworks.automotive.display@1.0",
        "android.hardware.graphics.bufferqueue@1.0",
        "android.hardware.graphics.bufferqueue@2.0",
    ],

    cflags: [
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ Return<EvsResult> EvsCamera::setMaster() {
    return EvsResult::OK;
}

Return<EvsResult> EvsCamera::forceMaster(const sp<IEvsDisplay>& ) {
Return<EvsResult> EvsCamera::forceMaster(const sp<IEvsDisplay_1_0>& ) {
    // Default implementation does not expect multiple subscribers and therefore
    // return a success code always.
    return EvsResult::OK;
Loading