Skip to content

Commit

Permalink
Fix occasional completely mute incoming call
Browse files Browse the repository at this point in the history
- when PHONE_INCOMING_RING message accidentaly arrives to CallNotifier
  immediately after the user answers the call, the call state is still
  RINGING instead of OFFHOOK, so ring plays again, causing audio
  driver to switch from just entered IN_CALL mode back to RINGING mode,
  which can lead to completely mute phone call - no side of call can be
  heard
- prevent this scenario by calling silenceRinger() instead of stopRing()
  at the beginning of answerCall(), so not only the current ring is
  stopped, but also the possible next ring prevented

Change-Id: I8013eaab6dca08041f5e1a701ba56e09ef460f43
  • Loading branch information
nadlabak authored and rmcc committed Jun 11, 2012
1 parent 0f82853 commit 60a84ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/android/phone/PhoneUtils.java
Expand Up @@ -243,8 +243,8 @@ static boolean answerCall(Call ringing) {
if (DBG) log("answerCall()...");

// If the ringer is currently ringing and/or vibrating, stop it
// right now (before actually answering the call.)
PhoneApp.getInstance().getRinger().stopRing();
// right now and prevent new rings (before actually answering the call.)
PhoneApp.getInstance().notifier.silenceRinger();

boolean answered = false;
PhoneApp app = PhoneApp.getInstance();
Expand Down

0 comments on commit 60a84ca

Please sign in to comment.