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

Commit f679e8b6 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Branch out Broadcast Radio 1.2 HAL.

Bug: 62945293
Change-Id: Ic84f9fe6c17040053257085801208ed527fd07ab
Fixes: 64115813
Test: instrumentation, VTS
parent 2cf5bc8d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@ cc_test {
    static_libs: [
        "android.hardware.broadcastradio@1.0",
        "android.hardware.broadcastradio@1.1",
        "android.hardware.broadcastradio@1.1-utils-lib",
        "android.hardware.broadcastradio@1.1-vts-utils-lib",
        "android.hardware.broadcastradio@common-utils-lib",
        "android.hardware.broadcastradio@vts-utils-lib",
        "libgmock",
    ],
}
+84 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen. Do not edit manually.

filegroup {
    name: "android.hardware.broadcastradio@1.2_hal",
    srcs: [
        "types.hal",
        "IBroadcastRadioFactory.hal",
        "ITuner.hal",
        "ITunerCallback.hal",
    ],
}

genrule {
    name: "android.hardware.broadcastradio@1.2_genc++",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.2",
    srcs: [
        ":android.hardware.broadcastradio@1.2_hal",
    ],
    out: [
        "android/hardware/broadcastradio/1.2/types.cpp",
        "android/hardware/broadcastradio/1.2/BroadcastRadioFactoryAll.cpp",
        "android/hardware/broadcastradio/1.2/TunerAll.cpp",
        "android/hardware/broadcastradio/1.2/TunerCallbackAll.cpp",
    ],
}

genrule {
    name: "android.hardware.broadcastradio@1.2_genc++_headers",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.2",
    srcs: [
        ":android.hardware.broadcastradio@1.2_hal",
    ],
    out: [
        "android/hardware/broadcastradio/1.2/types.h",
        "android/hardware/broadcastradio/1.2/hwtypes.h",
        "android/hardware/broadcastradio/1.2/IBroadcastRadioFactory.h",
        "android/hardware/broadcastradio/1.2/IHwBroadcastRadioFactory.h",
        "android/hardware/broadcastradio/1.2/BnHwBroadcastRadioFactory.h",
        "android/hardware/broadcastradio/1.2/BpHwBroadcastRadioFactory.h",
        "android/hardware/broadcastradio/1.2/BsBroadcastRadioFactory.h",
        "android/hardware/broadcastradio/1.2/ITuner.h",
        "android/hardware/broadcastradio/1.2/IHwTuner.h",
        "android/hardware/broadcastradio/1.2/BnHwTuner.h",
        "android/hardware/broadcastradio/1.2/BpHwTuner.h",
        "android/hardware/broadcastradio/1.2/BsTuner.h",
        "android/hardware/broadcastradio/1.2/ITunerCallback.h",
        "android/hardware/broadcastradio/1.2/IHwTunerCallback.h",
        "android/hardware/broadcastradio/1.2/BnHwTunerCallback.h",
        "android/hardware/broadcastradio/1.2/BpHwTunerCallback.h",
        "android/hardware/broadcastradio/1.2/BsTunerCallback.h",
    ],
}

cc_library {
    name: "android.hardware.broadcastradio@1.2",
    defaults: ["hidl-module-defaults"],
    generated_sources: ["android.hardware.broadcastradio@1.2_genc++"],
    generated_headers: ["android.hardware.broadcastradio@1.2_genc++_headers"],
    export_generated_headers: ["android.hardware.broadcastradio@1.2_genc++_headers"],
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libutils",
        "libcutils",
        "android.hardware.broadcastradio@1.0",
        "android.hardware.broadcastradio@1.1",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hardware.broadcastradio@1.0",
        "android.hardware.broadcastradio@1.1",
    ],
}
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.broadcastradio@1.2;

import @1.1::IBroadcastRadioFactory;

/**
 * To use 1.2 features you must cast specific interfaces returned from the
 * 1.0 HAL. For example V1_0::IBroadcastRadio::openTuner() returns V1_0::ITuner,
 * which can be cast with V1_2::ITuner::castFrom() call.
 *
 * The 1.2 server must always return the 1.2 version of specific interface.
 */
interface IBroadcastRadioFactory extends @1.1::IBroadcastRadioFactory {
};
+22 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.broadcastradio@1.2;

import @1.1::ITuner;

interface ITuner extends @1.1::ITuner {
};
+22 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.broadcastradio@1.2;

import @1.1::ITunerCallback;

interface ITunerCallback extends @1.1::ITunerCallback {
};
Loading