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

Commit 2bdcb10b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "FadeOutManager: the NPE problem due to add null value to SparseArray."...

Merge "FadeOutManager: the NPE problem due to add null value to SparseArray." into main am: 7c376760 am: 0543aff7

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3415680



Change-Id: Ie72c83e46ec058350c29c0c5167570fd793de03e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents da72c8cf 0543aff7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -673,6 +673,7 @@ public final class FadeManagerConfiguration implements Parcelable {
        return config != null ? config.getDuration() : DURATION_NOT_SET;
    }

    @Nullable
    private VolumeShaper.Configuration getVolumeShaperConfigFromWrapper(
            FadeVolumeShaperConfigsWrapper wrapper, boolean isFadeIn) {
        // if no volume shaper config is available, return null
+4 −2
Original line number Diff line number Diff line
@@ -199,10 +199,12 @@ public final class FadeOutManager {
            for (AudioPlaybackConfiguration apc : players) {
                final VolumeShaper.Configuration volShaper =
                        mFadeConfigurations.getFadeOutVolumeShaperConfig(apc.getAudioAttributes());
                if (volShaper != null) {
                    fa.addFade(apc, /* skipRamp= */ false, volShaper);
                }
            }
        }
    }

    /**
     * Remove the app for the given UID from the list of faded out apps, unfade out its players
@@ -249,7 +251,7 @@ public final class FadeOutManager {
            final VolumeShaper.Configuration volShaper =
                    mFadeConfigurations.getFadeOutVolumeShaperConfig(apc.getAudioAttributes());
            final FadedOutApp fa = mUidToFadedAppsMap.get(apc.getClientUid());
            if (fa == null) {
            if (fa == null || volShaper == null) {
                return;
            }
            fa.addFade(apc, /* skipRamp= */ true, volShaper);