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

Commit 6a330bf2 authored by Hwayoung Helen Kim's avatar Hwayoung Helen Kim Committed by Android (Google) Code Review
Browse files

Merge "VTS implementation for ImsMediaHal"

parents 6a058b00 e4af3c6d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ cc_library {
        "android.hardware.radio.config@1.3",
        "android.hardware.radio.data-V2-ndk",
        "android.hardware.radio.ims-V1-ndk",
        "android.hardware.radio.ims.media-V1-ndk",
        "android.hardware.radio.messaging-V2-ndk",
        "android.hardware.radio.modem-V2-ndk",
        "android.hardware.radio.network-V2-ndk",
@@ -75,6 +76,8 @@ cc_library {
        "ims/RadioIndication-ims.cpp",
        "ims/RadioResponse-ims.cpp",
        "ims/RadioIms.cpp",
        "ims/media/RadioImsMediaSession.cpp",
        "ims/media/RadioImsMedia.cpp",
        "messaging/RadioIndication-messaging.cpp",
        "messaging/RadioMessaging.cpp",
        "messaging/RadioResponse-messaging.cpp",
+49 −0
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.
 */

#include <libradiocompat/RadioImsMedia.h>

#include "commonStructs.h"
#include "debug.h"

#include "collections.h"

#define RADIO_MODULE "ImsMedia"

namespace android::hardware::radio::compat {

using ::ndk::ScopedAStatus;
constexpr auto ok = &ScopedAStatus::ok;

ScopedAStatus RadioImsMedia::setListener(
        const std::shared_ptr<::aidl::android::hardware::radio::ims::media::
                                      IImsMediaListener>& /*in_mediaListener*/) {
    LOG(ERROR) << " setListener is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMedia::openSession(
        int32_t /*in_sessionId*/,
        const ::aidl::android::hardware::radio::ims::media::LocalEndPoint& /*in_localEndPoint*/,
        const ::aidl::android::hardware::radio::ims::media::RtpConfig& /*in_config*/) {
    LOG(ERROR) << " openSession is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMedia::closeSession(int32_t /*in_sessionId*/) {
    LOG(ERROR) << " closeSession is unsupported by HIDL HALs";
    return ok();
}

}  // namespace android::hardware::radio::compat
+64 −0
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.
 */

#include <libradiocompat/RadioImsMediaSession.h>

#include "commonStructs.h"
#include "debug.h"

#include "collections.h"

#define RADIO_MODULE "ImsMediaSession"

namespace android::hardware::radio::compat {

using ::ndk::ScopedAStatus;
namespace aidl = ::aidl::android::hardware::radio::ims::media;
constexpr auto ok = &ScopedAStatus::ok;

ScopedAStatus RadioImsMediaSession::setListener(
        const std::shared_ptr<aidl::IImsMediaSessionListener>& /*in_sessionListener*/) {
    LOG(ERROR) << " setListener is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMediaSession::modifySession(const aidl::RtpConfig& /*in_config*/) {
    LOG(ERROR) << " modifySession is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMediaSession::sendDtmf(char16_t /*in_dtmfDigit*/, int32_t /*in_duration*/) {
    LOG(ERROR) << " sendDtmf is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMediaSession::startDtmf(char16_t /*in_dtmfDigit*/) {
    LOG(ERROR) << " startDtmf is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMediaSession::stopDtmf() {
    LOG(ERROR) << " stopDtmf is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMediaSession::sendHeaderExtension(
        const std::vector<aidl::RtpHeaderExtension>& /*in_extensions*/) {
    LOG(ERROR) << " sendHeaderExtension is unsupported by HIDL HALs";
    return ok();
}
ScopedAStatus RadioImsMediaSession::setMediaQualityThreshold(
        const aidl::MediaQualityThreshold& /*in_threshold*/) {
    LOG(ERROR) << " setMediaQualityThreshold is unsupported by HIDL HALs";
    return ok();
}

}  // namespace android::hardware::radio::compat
+40 −0
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.
 */
#pragma once

#include "RadioCompatBase.h"

#include <aidl/android/hardware/radio/ims/media/BnImsMedia.h>

namespace android::hardware::radio::compat {

class RadioImsMedia : public RadioCompatBase,
                      public aidl::android::hardware::radio::ims::media::BnImsMedia {
    ::ndk::ScopedAStatus setListener(
            const std::shared_ptr<::aidl::android::hardware::radio::ims::media::IImsMediaListener>&
                    in_mediaListener) override;
    ::ndk::ScopedAStatus openSession(
            int32_t in_sessionId,
            const ::aidl::android::hardware::radio::ims::media::LocalEndPoint& in_localEndPoint,
            const ::aidl::android::hardware::radio::ims::media::RtpConfig& in_config) override;
    ::ndk::ScopedAStatus closeSession(int32_t in_sessionId) override;

  protected:
  public:
    using RadioCompatBase::RadioCompatBase;
};

}  // namespace android::hardware::radio::compat
+47 −0
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.
 */
#pragma once

#include "RadioCompatBase.h"

#include <aidl/android/hardware/radio/ims/media/BnImsMediaSession.h>

namespace android::hardware::radio::compat {

class RadioImsMediaSession : public RadioCompatBase,
                             public aidl::android::hardware::radio::ims::media::BnImsMediaSession {
    ::ndk::ScopedAStatus setListener(
            const std::shared_ptr<
                    ::aidl::android::hardware::radio::ims::media::IImsMediaSessionListener>&
                    in_sessionListener) override;
    ::ndk::ScopedAStatus modifySession(
            const ::aidl::android::hardware::radio::ims::media::RtpConfig& in_config) override;
    ::ndk::ScopedAStatus sendDtmf(char16_t in_dtmfDigit, int32_t in_duration) override;
    ::ndk::ScopedAStatus startDtmf(char16_t in_dtmfDigit) override;
    ::ndk::ScopedAStatus stopDtmf() override;
    ::ndk::ScopedAStatus sendHeaderExtension(
            const std::vector<::aidl::android::hardware::radio::ims::media::RtpHeaderExtension>&
                    in_extensions) override;
    ::ndk::ScopedAStatus setMediaQualityThreshold(
            const ::aidl::android::hardware::radio::ims::media::MediaQualityThreshold& in_threshold)
            override;

  protected:
  public:
    using RadioCompatBase::RadioCompatBase;
};

}  // namespace android::hardware::radio::compat
Loading