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
diff --git a/src/com/android/music/MediaButtonIntentReceiver.java b/src/com/android/music/MediaButtonIntentReceiver.java
index 76812df..44d76db 100644
--- a/src/com/android/music/MediaButtonIntentReceiver.java
+++ b/src/com/android/music/MediaButtonIntentReceiver.java
@@ -85,17 +85,17 @@
String command = null;
switch (keycode) {
- case KeyEvent.KEYCODE_STOP:
+ case KeyEvent.KEYCODE_MEDIA_STOP:
command = MediaPlaybackService.CMDSTOP;
break;
case KeyEvent.KEYCODE_HEADSETHOOK:
- case KeyEvent.KEYCODE_PLAYPAUSE:
+ case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
command = MediaPlaybackService.CMDTOGGLEPAUSE;
break;
- case KeyEvent.KEYCODE_NEXTSONG:
+ case KeyEvent.KEYCODE_MEDIA_NEXT:
command = MediaPlaybackService.CMDNEXT;
break;
- case KeyEvent.KEYCODE_PREVIOUSSONG:
+ case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
command = MediaPlaybackService.CMDPREVIOUS;
break;
}