title: Accepting incoming call using adb command turn the speaker on
body: <p>I have a rooted phone accepting incoming phone calls using the adb command:</p>
  
  <pre><code>adb shell service call phone 5
  </code></pre>
  
  <p>After a call starts, I have noticed that the phone speaker turns on automatically, and I've seen this with 2 different devices. I also tried to turn the speaker off using AudioManager after the call started, but it seems to not be working. Here is the code to turn off the speaker during a call:</p>
  
  <pre><code>AudioManager audioManager = ((AudioManager) context.getSystemService(Context.AUDIO_SERVICE));
          audioManager.setMode(AudioManager.MODE_IN_CALL);
          audioManager.setSpeakerphoneOn(false);
  </code></pre>
  
  <p>Can someone tell me why my speaker turns on when a call has been accepted by adb and is there any other command(adb) which I can run in parallel to turn off the speaker?</p>