diff options
author | NicoleYarroch <nicole@livio.io> | 2019-07-11 11:45:51 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2019-07-11 11:45:51 -0400 |
commit | fabe3c962099f34a97a292086df6562ce5e3694f (patch) | |
tree | 76233d2b595dd9cf4e6324ac702022d299805ddc | |
parent | b3af21fd117c8e700d15b49b27963c18021fa665 (diff) | |
download | sdl_android-fabe3c962099f34a97a292086df6562ce5e3694f.tar.gz |
Added CloseApplication to SdlProxyBase
- renamed method for consistency
3 files changed, 19 insertions, 3 deletions
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java b/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java index 8d736c393..7d8d06b50 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java @@ -639,7 +639,7 @@ public class ProxyBridge implements IProxyListener{ } @Override - public void onCloseApplication(CloseApplicationResponse response) { + public void onCloseApplicationResponse(CloseApplicationResponse response) { onRPCReceived(response); } } diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java index 56e1c8544..cfb72f7e4 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java @@ -3694,6 +3694,22 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> _proxyListener.onPerformAppServiceInteractionResponse( msg);
onRPCResponseReceived(msg);
}
+ } else if (functionName.equals(FunctionID.CLOSE_APPLICATION.toString())) {
+ final CloseApplicationResponse msg = new CloseApplicationResponse(hash);
+ msg.format(rpcSpecVersion, true);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onCloseApplicationResponse( msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onCloseApplicationResponse( msg);
+ onRPCResponseReceived(msg);
+ }
} else {
if (_sdlMsgVersion != null) {
DebugTool.logError("Unrecognized response Message: " + functionName +
diff --git a/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java b/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java index 2d85fc056..06b2890fb 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java +++ b/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java @@ -416,10 +416,10 @@ public interface IProxyListenerBase { public void onOnSystemCapabilityUpdated(OnSystemCapabilityUpdated notification);
/**
- * onCloseApplication being called indicates that SDL has
+ * onCloseApplicationResponse being called indicates that SDL has
* responded to a request to close the application on the module.
*
* @param response - Contains information about the response sent from SDL.
*/
- public void onCloseApplication(CloseApplicationResponse response);
+ public void onCloseApplicationResponse(CloseApplicationResponse response);
}
\ No newline at end of file |