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

Commit e9ea25f3 authored by Pawan Wagh's avatar Pawan Wagh Committed by Automerger Merge Worker
Browse files

Merge "Check for null params in VolumeShaper" into main am: ff23d42f am:...

Merge "Check for null params in VolumeShaper" into main am: ff23d42f am: 5d00c025 am: 9097e4be am: ca3996b3

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2647385



Change-Id: I95216e7907ded3c07ecac7d5c5fc8021e3175393
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6bbb2d8a ca3996b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1099,7 +1099,7 @@ public:
     * internal to the VolumeHandler.
     * internal to the VolumeHandler.
     */
     */
    void setIdIfNecessary(const sp<VolumeShaper::Configuration> &configuration) {
    void setIdIfNecessary(const sp<VolumeShaper::Configuration> &configuration) {
        if (configuration->getType() == VolumeShaper::Configuration::TYPE_SCALE) {
        if (configuration && configuration->getType() == VolumeShaper::Configuration::TYPE_SCALE) {
            const int id = configuration->getId();
            const int id = configuration->getId();
            if (id == -1) {
            if (id == -1) {
                // Reassign to a unique id, skipping system ids.
                // Reassign to a unique id, skipping system ids.
+10 −0
Original line number Original line Diff line number Diff line
@@ -2627,6 +2627,16 @@ VolumeShaper::Status MediaPlayerService::AudioOutput::applyVolumeShaper(
    Mutex::Autolock lock(mLock);
    Mutex::Autolock lock(mLock);
    ALOGV("AudioOutput::applyVolumeShaper");
    ALOGV("AudioOutput::applyVolumeShaper");


    if (configuration == nullptr) {
        ALOGE("AudioOutput::applyVolumeShaper Null configuration parameter");
        return VolumeShaper::Status(BAD_VALUE);
    }

    if (operation == nullptr) {
        ALOGE("AudioOutput::applyVolumeShaper Null operation parameter");
        return VolumeShaper::Status(BAD_VALUE);
    }

    mVolumeHandler->setIdIfNecessary(configuration);
    mVolumeHandler->setIdIfNecessary(configuration);


    VolumeShaper::Status status;
    VolumeShaper::Status status;