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

Commit 21ff145e authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Ensure non-ringing call doesn't start ringing." into qt-dev

am: 2def3fee

Change-Id: I0331e7780a52d2fd73ac7783bc66b4c4f9500d03
parents 538a37f2 2def3fee
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -208,6 +208,14 @@ public class Ringer {
            return false;
        }

        if (foregroundCall.getState() != CallState.RINGING) {
            // Its possible for bluetooth to connect JUST as a call goes active, which would mean
            // the call would start ringing again.
            Log.i(this, "startRinging called for non-ringing foreground callid=%s",
                    foregroundCall.getId());
            return false;
        }

        AudioManager audioManager =
                (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
        boolean isVolumeOverZero = audioManager.getStreamVolume(AudioManager.STREAM_RING) > 0;