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

Commit 1d421653 authored by Alastair Breeze's avatar Alastair Breeze
Browse files

Fixed volume logging on sticky broadcasts

Ringer mode changed is a sticky broadcast and is currently being logged on broadcast attach for normal and vibrate state (not silent). This change instead uses the sticky broadcast to initialise the current state rather than logging.

Test: manual
Change-Id: I09e91ec4b71fbbbfae71d188d9c858675a7e774d
Fixes: 117315582
parent a68e3ccd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -956,11 +956,13 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
                changed |= onVolumeChangedW(stream, 0);
            } else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION)) {
                final int rm = intent.getIntExtra(AudioManager.EXTRA_RINGER_MODE, -1);
                if (isInitialStickyBroadcast()) mState.ringerModeExternal = rm;
                if (D.BUG) Log.d(TAG, "onReceive RINGER_MODE_CHANGED_ACTION rm="
                        + Util.ringerModeToString(rm));
                changed = updateRingerModeExternalW(rm);
            } else if (action.equals(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION)) {
                final int rm = intent.getIntExtra(AudioManager.EXTRA_RINGER_MODE, -1);
                if (isInitialStickyBroadcast()) mState.ringerModeInternal = rm;
                if (D.BUG) Log.d(TAG, "onReceive INTERNAL_RINGER_MODE_CHANGED_ACTION rm="
                        + Util.ringerModeToString(rm));
                changed = updateRingerModeInternalW(rm);