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

Commit 5d7ed89d authored by Mike Lockwood's avatar Mike Lockwood Committed by Android Git Automerger
Browse files

am e7ef4241: Fix volume keys when in-call and screen is off due to proximity sensor.

Merge commit 'e7ef42416088235d9e220e3b031d4f612f436a06' into eclair-plus-aosp

* commit 'e7ef42416088235d9e220e3b031d4f612f436a06':
  Fix volume keys when in-call and screen is off due to proximity sensor.
parents fc1ea7ad 99ff0a82
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1651,14 +1651,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    if (!mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(event.keycode)
                            && (event.keycode == KeyEvent.KEYCODE_VOLUME_DOWN
                                || event.keycode == KeyEvent.KEYCODE_VOLUME_UP)) {
                        // when keyguard is showing and screen off, we need
                        // to handle the volume key for calls and  music here
                        if (isInCall()) {
                            // if the keyguard didn't wake the device, we are in call, and
                            // it is a volume key, turn on the screen so that the user
                            // can more easily adjust the in call volume.
                            mKeyguardMediator.pokeWakelock();
                            handleVolumeKey(AudioManager.STREAM_VOICE_CALL, event.keycode);
                        } else if (isMusicActive()) {
                            // when keyguard is showing and screen off, we need
                            // to handle the volume key for music here
                            handleVolumeKey(AudioManager.STREAM_MUSIC, event.keycode);
                        }
                    }