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

Commit 17fb49aa authored by Santiago Seifert's avatar Santiago Seifert Committed by Android (Google) Code Review
Browse files

Merge "Remove unnecessary if in MediaSessionService#dispatchAdjustVolumeLocked" into main

parents 31a00a3a d45d3fcd
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -2188,11 +2188,10 @@ public class MediaSessionService extends SystemService implements Monitor {
            MediaSessionRecordImpl session = isGlobalPriorityActiveLocked() ? mGlobalPrioritySession
                    : mCurrentFullUserRecord.mPriorityStack.getDefaultVolumeSession();

            boolean preferSuggestedStream = false;
            if (isValidLocalStreamType(suggestedStream)
                    && AudioSystem.isStreamActive(suggestedStream, 0)) {
                preferSuggestedStream = true;
            }
            boolean preferSuggestedStream =
                    isValidLocalStreamType(suggestedStream)
                            && AudioSystem.isStreamActive(suggestedStream, 0);

            if (session == null || preferSuggestedStream) {
                if (DEBUG_KEY_EVENT) {
                    Log.d(TAG, "Adjusting suggestedStream=" + suggestedStream + " by " + direction