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

Commit 11fdde72 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13182071 from bfd326f6 to 25Q2-release

Change-Id: I33526204f4e1d134ae30a1204ea0ef35c4e90264
parents 62222c13 bfd326f6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -187,6 +187,14 @@ flag {
    is_exported: true
}

flag {
    name: "ringtone_user_uri_check"
    is_exported: true
    namespace: "media_audio"
    description: "check user for RingtonePlayer URIs"
    bug: "400434060"
}

flag {
    name: "sco_managed_by_audio"
    is_exported: true
+26 −8
Original line number Diff line number Diff line
@@ -271,16 +271,10 @@ status_t StreamHalAidl::standby() {
    }
}

status_t StreamHalAidl::dump(int fd, const Vector<String16>& args) {
status_t StreamHalAidl::dump(int fd, const Vector<String16>& args __unused) {
    AUGMENT_LOG(D);
    TIME_CHECK();
    if (!mStream) return NO_INIT;
    Vector<String16> newArgs = args;
    newArgs.push(String16(kDumpFromAudioServerArgument));
    // Do not serialize the dump call with mCallLock
    status_t status = mStream->dump(fd, Args(newArgs).args(), newArgs.size());
    mStreamPowerLog.dump(fd);
    return status;
    return OK;
}

status_t StreamHalAidl::start() {
@@ -1148,6 +1142,18 @@ status_t StreamOutHalAidl::filterAndUpdateOffloadMetadata(AudioParameter &parame
    return OK;
}

status_t StreamOutHalAidl::dump(int fd, const Vector<String16>& args) {
    AUGMENT_LOG(D);
    TIME_CHECK();
    if (!mStream) return NO_INIT;
    Vector<String16> newArgs = args;
    newArgs.push(String16(kDumpFromAudioServerArgument));
    // Do not serialize the dump call with mCallLock
    status_t status = mStream->dump(fd, Args(newArgs).args(), newArgs.size());
    StreamHalAidl::dump(fd, args);
    return status;
}

// static
ConversionResult<::aidl::android::hardware::audio::common::SinkMetadata>
StreamInHalAidl::legacy2aidl_SinkMetadata(const StreamInHalInterface::SinkMetadata& legacy) {
@@ -1264,4 +1270,16 @@ status_t StreamInHalAidl::setPreferredMicrophoneFieldDimension(float zoom) {
            serializeCall(mStream, &Stream::setMicrophoneFieldDimension, zoom));
}

status_t StreamInHalAidl::dump(int fd, const Vector<String16>& args) {
    AUGMENT_LOG(D);
    TIME_CHECK();
    if (!mStream) return NO_INIT;
    Vector<String16> newArgs = args;
    newArgs.push(String16(kDumpFromAudioServerArgument));
    // Do not serialize the dump call with mCallLock
    status_t status = mStream->dump(fd, Args(newArgs).args(), newArgs.size());
    StreamHalAidl::dump(fd, args);
    return status;
}

} // namespace android
+4 −0
Original line number Diff line number Diff line
@@ -449,6 +449,8 @@ class StreamOutHalAidl : public virtual StreamOutHalInterface,
    void onDrainReady() override;
    void onError(bool isHardError) override;

    status_t dump(int fd, const Vector<String16>& args) override;

  private:
    friend class sp<StreamOutHalAidl>;

@@ -507,6 +509,8 @@ class StreamInHalAidl : public StreamInHalInterface, public StreamHalAidl {
    // Called when the metadata of the stream's sink has been changed.
    status_t updateSinkMetadata(const SinkMetadata& sinkMetadata) override;

    status_t dump(int fd, const Vector<String16>& args) override;

  private:
    friend class sp<StreamInHalAidl>;

+7 −10
Original line number Diff line number Diff line
@@ -93,19 +93,19 @@ class IEffectMock : public ::aidl::android::hardware::audio::effect::BnEffect {
    MOCK_METHOD(ndk::ScopedAStatus, reopen, (IEffect::OpenEffectReturn * ret), (override));

    ndk::ScopedAStatus setParameter(const Parameter& param) {
        if (param == expectParam)
        if (param == mExpectParam)
            return ndk::ScopedAStatus::ok();
        else {
            ALOGW("%s mismatch, %s vs %s", __func__, param.toString().c_str(),
                  expectParam.toString().c_str());
                  mExpectParam.toString().c_str());
            return ndk::ScopedAStatus::fromStatus(STATUS_BAD_VALUE);
        }
    }

    void setExpectParameter(const Parameter& param) { expectParam = param; }
    void setExpectParameter(const Parameter& param) { mExpectParam = param; }

  private:
    Parameter expectParam;
    Parameter mExpectParam;
};

// Predefined vector of {audio_devices_t, AudioDeviceDescription} pair
@@ -295,12 +295,9 @@ class EffectHalAidlTest : public testing::Test {
            AudioDeviceTypeAddrVector deviceTypes;
            std::vector<AudioDeviceDescription> deviceDescs;
            for (size_t w = 0; w < window; w++) {
                AudioDeviceTypeAddr deviceType(kAudioDevicePairs[i + w].first /* audio_device_t */,
                                               "");
                AudioDeviceDescription deviceDesc{
                        kAudioDevicePairs[i + w].second /* AudioDeviceDescription */};
                deviceTypes.emplace_back(std::move(deviceType));
                deviceDescs.emplace_back(std::move(deviceDesc));
                deviceTypes.emplace_back(kAudioDevicePairs[i + w].first /* audio_device_t */, "");
                deviceDescs.emplace_back(
                        kAudioDevicePairs[i + w].second /* AudioDeviceDescription */);
            }
            const Parameter expect = Parameter::make<Parameter::deviceDescription>(deviceDescs);
            mIEffectMock->setExpectParameter(expect);