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

Commit 3e08f0dd authored by Alice Kuo's avatar Alice Kuo
Browse files

Trigger mute/unmute function for PTS mode only

RINGER_MODE_CHANGE should not trigger mute/unmute for the media and call sound for the product. Change these action for PTS test only

Bug: 239501091
Test: change ringer mode during media streaming and phone call
Change-Id: I33a5b5129ceab3347b549b048a5868aa06e794bc
parent e0c876c5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1645,6 +1645,8 @@ public class LeAudioService extends ProfileService {

            final String action = intent.getAction();
            if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION)) {
                if (!Utils.isPtsTestMode()) return;

                int ringerMode = intent.getIntExtra(AudioManager.EXTRA_RINGER_MODE, -1);

                if (ringerMode < 0 || ringerMode == mStoredRingerMode) return;