From 7bdd53008a07d7bb4d28f9624ddcd29eb42bbf52 Mon Sep 17 00:00:00 2001 From: Tom Yan Date: Wed, 4 Apr 2018 18:54:21 +0800 Subject: [PATCH] MediaPlayerAPI: eliminate pointless toUpperCase() Fixes #154. --- app/src/main/java/com/termux/api/MediaPlayerAPI.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/termux/api/MediaPlayerAPI.java b/app/src/main/java/com/termux/api/MediaPlayerAPI.java index 271c70e..cb94d57 100644 --- a/app/src/main/java/com/termux/api/MediaPlayerAPI.java +++ b/app/src/main/java/com/termux/api/MediaPlayerAPI.java @@ -125,16 +125,16 @@ public class MediaPlayerAPI { } protected static MediaCommandHandler getMediaCommandHandler(final String command) { - switch (command == null ? "" : command.toUpperCase()) { - case "INFO": + switch (command == null ? "" : command) { + case "info": return infoHandler; - case "PLAY": + case "play": return playHandler; - case "PAUSE": + case "pause": return pauseHandler; - case "RESUME": + case "resume": return resumeHandler; - case "STOP": + case "stop": return stopHandler; default: return new MediaCommandHandler() {