diff options
author | Joey Grover <joeygrover@gmail.com> | 2018-12-03 12:28:19 -0500 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2018-12-03 12:28:19 -0500 |
commit | 1596a2defb397194787ba551f1c9cf9dd9425362 (patch) | |
tree | 935cf1d2aca2daddba1a24bcf224d5f8b82082b4 | |
parent | 12ead329b9e5adb89c84761af0a1bfd1e2235e21 (diff) | |
download | sdl_android-1596a2defb397194787ba551f1c9cf9dd9425362.tar.gz |
Cache and expose entire RAI responsefeature/expose_rai_response
-rw-r--r-- | sdl_android/src/main/java/com/smartdevicelink/managers/SdlManager.java | 16 | ||||
-rw-r--r-- | sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java | 15 |
2 files changed, 31 insertions, 0 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/managers/SdlManager.java b/sdl_android/src/main/java/com/smartdevicelink/managers/SdlManager.java index 2beb433a5..c2a6f993a 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/managers/SdlManager.java +++ b/sdl_android/src/main/java/com/smartdevicelink/managers/SdlManager.java @@ -29,6 +29,7 @@ import com.smartdevicelink.proxy.interfaces.ISdl; import com.smartdevicelink.proxy.interfaces.ISdlServiceListener; import com.smartdevicelink.proxy.interfaces.IVideoStreamListener; import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener; +import com.smartdevicelink.proxy.rpc.RegisterAppInterfaceResponse; import com.smartdevicelink.proxy.rpc.SdlMsgVersion; import com.smartdevicelink.proxy.rpc.SetAppIcon; import com.smartdevicelink.proxy.rpc.TTSChunk; @@ -374,6 +375,21 @@ public class SdlManager{ return proxy.getSystemCapabilityManager(); } + /** + * Method to retrieve the RegisterAppInterface Response message that was sent back from the + * module. It contains various attributes about the connected module and can be used to adapt + * to different module types and their supported features. + * + * @return RegisterAppInterfaceResponse received from the module or null if the app has not yet + * registered with the module. + */ + public RegisterAppInterfaceResponse getRegisterAppInterfaceResponse(){ + if(proxy != null){ + return proxy.getRegisterAppInterfaceResponse(); + } + return null; + } + // PROTECTED GETTERS protected String getAppName() { return appName; } diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java index 79284c302..093b71cb1 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java @@ -244,6 +244,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> protected List<Class<? extends SdlSecurityBase>> _secList = null;
protected SystemCapabilityManager _systemCapabilityManager;
protected Boolean _iconResumed = false;
+ protected RegisterAppInterfaceResponse raiResponse = null;
private final CopyOnWriteArrayList<IPutFileResponseListener> _putFileListenerList = new CopyOnWriteArrayList<IPutFileResponseListener>();
@@ -2169,6 +2170,8 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> private void processRaiResponse(RegisterAppInterfaceResponse rai)
{
if (rai == null) return;
+
+ this.raiResponse = rai;
VehicleType vt = rai.getVehicleType();
if (vt == null) return;
@@ -7378,6 +7381,18 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> return _iconResumed;
}
+ /**
+ * Method to retrieve the RegisterAppInterface Response message that was sent back from the
+ * module. It contains various attributes about the connected module and can be used to adapt
+ * to different module types and their supported features.
+ *
+ * @return RegisterAppInterfaceResponse received from the module or null if the app has not yet
+ * registered with the module.
+ */
+ public RegisterAppInterfaceResponse getRegisterAppInterfaceResponse(){
+ return this.raiResponse;
+ }
+
/**
* VideoStreamingManager houses all the elements needed to create a scoped, streaming manager for video projection. It is only a private, instance
|