diff options
| author | Joey Grover <joeygrover@gmail.com> | 2016-07-05 14:36:41 -0400 |
|---|---|---|
| committer | Joey Grover <joeygrover@gmail.com> | 2016-07-05 14:36:41 -0400 |
| commit | 4143604c42af074cb252f28bc16e7a1e1bed1bba (patch) | |
| tree | 592dc1ea1bc47c7eb927e39cfef07b26268eb54f | |
| parent | b0bb9bf0d73fad5b0aef64660ae08c76a3035814 (diff) | |
| download | sdl_android-feature/playpause.tar.gz | |
Added automatic changing of OK button to PLAY_PAUSE for older versionsfeature/playpause
Version check is currently a placeholder. It is unclear what version of the RPC messages will include the necessary changes
| -rw-r--r-- | sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java index b8a7a17f4..56a8cec69 100644 --- a/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java +++ b/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java @@ -2863,6 +2863,11 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> // OnButtonPress
final OnButtonPress msg = new OnButtonPress(hash);
+ if(_sdlMsgVersion!=null
+ && _sdlMsgVersion.getMajorVersion() < 4 && _sdlMsgVersion.getMinorVersion() < 3 //For now this is a placeholder, before merge we need to check if this is correct version (4.3)
+ && msg.getButtonName() == ButtonName.OK){ //If we are an older generation of module that didn't implement play_pause we need to swap out to the "OK" button to "Play_Pause"
+ msg.setButtonName(ButtonName.PLAY_PAUSE);
+ }
if (_callbackToUIThread) {
// Run in UI thread
_mainUIHandler.post(new Runnable() {
|
