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

Commit 2def3fee authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

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

parents 81f69cf5 aec2487d
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;