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

Commit 40e3af61 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am 8abc9e9b: Merge "Don\'t play a sound if a volume key press is canceled." into gingerbread

Merge commit '8abc9e9b' into gingerbread-plus-aosp

* commit '8abc9e9b':
  Don't play a sound if a volume key press is canceled.
parents 89b4cb1e 8abc9e9b
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -1317,6 +1317,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        switch (keyCode) {
            case KeyEvent.KEYCODE_VOLUME_UP:
            case KeyEvent.KEYCODE_VOLUME_DOWN: {
                if (!event.isCanceled()) {
                    AudioManager audioManager = (AudioManager) getContext().getSystemService(
                            Context.AUDIO_SERVICE);
                    if (audioManager != null) {
@@ -1330,6 +1331,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                                AudioManager.FLAG_PLAY_SOUND);
                        mVolumeKeyUpTime = SystemClock.uptimeMillis();
                    }
                }
                return true;
            }