diff options
author | Dianne Hackborn <> | 2009-04-09 12:31:13 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-09 12:31:13 -0700 |
commit | 5eabbd9f27b5684508b5f5f1f99030c67984ae81 (patch) | |
tree | ce5a74bab92023e7b3a49564183468a111bf51ca /core/java/android/widget | |
parent | d6fbffe6eabd7e910507f85853e1bc797a3c5d6d (diff) | |
download | frameworks_base-5eabbd9f27b5684508b5f5f1f99030c67984ae81.zip frameworks_base-5eabbd9f27b5684508b5f5f1f99030c67984ae81.tar.gz frameworks_base-5eabbd9f27b5684508b5f5f1f99030c67984ae81.tar.bz2 |
AI 145382: API review: change new media keycode names to avoid ambiguity.
Updates the key maps. During this I noticed that the dream keymap didn't have all of the media buttons like the sapphire key map...! So this is now changed to match.
BUG=1779435
Automated import of CL 145382
Diffstat (limited to 'core/java/android/widget')
-rw-r--r-- | core/java/android/widget/MediaController.java | 4 | ||||
-rw-r--r-- | core/java/android/widget/VideoView.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java index a2ec83f..b162a0e 100644 --- a/core/java/android/widget/MediaController.java +++ b/core/java/android/widget/MediaController.java @@ -388,12 +388,12 @@ public class MediaController extends FrameLayout { int keyCode = event.getKeyCode(); if (event.getRepeatCount() == 0 && event.isDown() && ( keyCode == KeyEvent.KEYCODE_HEADSETHOOK || - keyCode == KeyEvent.KEYCODE_PLAYPAUSE || + keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE || keyCode == KeyEvent.KEYCODE_SPACE)) { doPauseResume(); show(sDefaultTimeout); return true; - } else if (keyCode == KeyEvent.KEYCODE_STOP) { + } else if (keyCode == KeyEvent.KEYCODE_MEDIA_STOP) { if (mPlayer.isPlaying()) { mPlayer.pause(); updatePausePlay(); diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java index 4c5df2f..6d3a2d3 100644 --- a/core/java/android/widget/VideoView.java +++ b/core/java/android/widget/VideoView.java @@ -460,7 +460,7 @@ public class VideoView extends SurfaceView implements MediaPlayerControl { mMediaPlayer != null && mMediaController != null) { if (keyCode == KeyEvent.KEYCODE_HEADSETHOOK || - keyCode == KeyEvent.KEYCODE_PLAYPAUSE) { + keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE) { if (mMediaPlayer.isPlaying()) { pause(); mMediaController.show(); @@ -469,7 +469,7 @@ public class VideoView extends SurfaceView implements MediaPlayerControl { mMediaController.hide(); } return true; - } else if (keyCode == KeyEvent.KEYCODE_STOP + } else if (keyCode == KeyEvent.KEYCODE_MEDIA_STOP && mMediaPlayer.isPlaying()) { pause(); mMediaController.show(); |