Merge "Stop ignoring media key events in PhoneFallbackEventHandler while in call" into sc-dev am: d05e7856d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14495988 Change-Id: Id276978324ef51a715eb0147b88034408e151dbb
This commit is contained in:
@@ -97,11 +97,6 @@ public class PhoneFallbackEventHandler implements FallbackEventHandler {
|
|||||||
case KeyEvent.KEYCODE_MEDIA_PLAY:
|
case KeyEvent.KEYCODE_MEDIA_PLAY:
|
||||||
case KeyEvent.KEYCODE_MEDIA_PAUSE:
|
case KeyEvent.KEYCODE_MEDIA_PAUSE:
|
||||||
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
|
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
|
||||||
/* Suppress PLAY/PAUSE toggle when phone is ringing or in-call
|
|
||||||
* to avoid music playback */
|
|
||||||
if (getTelephonyManager().getCallState() != TelephonyManager.CALL_STATE_IDLE) {
|
|
||||||
return true; // suppress key event
|
|
||||||
}
|
|
||||||
case KeyEvent.KEYCODE_MUTE:
|
case KeyEvent.KEYCODE_MUTE:
|
||||||
case KeyEvent.KEYCODE_HEADSETHOOK:
|
case KeyEvent.KEYCODE_HEADSETHOOK:
|
||||||
case KeyEvent.KEYCODE_MEDIA_STOP:
|
case KeyEvent.KEYCODE_MEDIA_STOP:
|
||||||
|
|||||||
Reference in New Issue
Block a user