summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2017-09-22 14:26:05 -0400
committerJoey Grover <joeygrover@gmail.com>2017-09-22 14:26:05 -0400
commitf215e736202f1b82f3ececb6325fa4d8992bd3f9 (patch)
tree47c873a82ece3bd98e58f99a65cfb9ba8fa7379b
parentcc7835ce8d71cdbe5ba72b7225ed616a5ea3c628 (diff)
downloadsdl_android-f215e736202f1b82f3ececb6325fa4d8992bd3f9.tar.gz
Remove references to deleted capability vars in SdlProxyALM
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java38
1 files changed, 21 insertions, 17 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java
index 58e52f2c0..8a8437db1 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java
@@ -16,6 +16,7 @@ import com.smartdevicelink.proxy.rpc.HMICapabilities;
import com.smartdevicelink.proxy.rpc.PresetBankCapabilities;
import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
+import com.smartdevicelink.proxy.rpc.SystemCapability;
import com.smartdevicelink.proxy.rpc.TTSChunk;
import com.smartdevicelink.proxy.rpc.VehicleType;
import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
@@ -32,6 +33,8 @@ import com.smartdevicelink.transport.BaseTransportConfig;
import com.smartdevicelink.transport.MultiplexTransportConfig;
import com.smartdevicelink.transport.enums.TransportType;
+import static com.smartdevicelink.proxy.SystemCapabilityManager.convertToList;
+
public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
@@ -1636,10 +1639,11 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is unavailable. Unable to get the buttonCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _buttonCapabilities;
+
+ return ( List<ButtonCapabilities> ) convertToList(_systemCapabilityManager.getCapability(SystemCapabilityType.BUTTON));
}
/**
@@ -1657,10 +1661,10 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is not connected. Unable to get the softButtonCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _softButtonCapabilities;
+ return ( List<SoftButtonCapabilities> ) convertToList(_systemCapabilityManager.getCapability(SystemCapabilityType.SOFTBUTTON));
}
/**
@@ -1681,7 +1685,7 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
if (!_appInterfaceRegisterd) {
throw new SdlException("SDL is not connected. Unable to get the presetBankCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _presetBankCapabilities;
+ return ( PresetBankCapabilities ) _systemCapabilityManager.getCapability(SystemCapabilityType.PRESET_BANK);
}
/**
@@ -1719,10 +1723,10 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is unavailable. Unable to get the displayCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _displayCapabilities;
+ return ( DisplayCapabilities ) convertToList(_systemCapabilityManager.getCapability(SystemCapabilityType.DISPLAY));
}
/**
@@ -1740,10 +1744,10 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is unavailable. Unable to get the hmiZoneCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _hmiZoneCapabilities;
+ return ( List<HmiZoneCapabilities> )convertToList(_systemCapabilityManager.getCapability(SystemCapabilityType.BUTTON));
}
/**
@@ -1761,11 +1765,11 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is unavailable. Unable to get the speechCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _speechCapabilities;
+ return ( List<SpeechCapabilities> )convertToList(_systemCapabilityManager.getCapability(SystemCapabilityType.BUTTON));
}
/**
* Gets PrerecordedSpeech set when application interface is registered.
@@ -1858,10 +1862,10 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is unavailable. Unable to get the vrCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _vrCapabilities;
+ return ( List<VrCapabilities> )convertToList(_systemCapabilityManager.getCapability(SystemCapabilityType.BUTTON));
}
/**
@@ -1898,10 +1902,10 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is not connected. Unable to get the vehicleType.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _audioPassThruCapabilities;
+ return ( List<AudioPassThruCapabilities> )convertToList(_systemCapabilityManager.getCapability(SystemCapabilityType.BUTTON));
}
public List<Integer> getSupportedDiagModes() throws SdlException {
@@ -1932,10 +1936,10 @@ public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
}
// Test SDL availability
- if (!_appInterfaceRegisterd) {
+ if (!_appInterfaceRegisterd || _systemCapabilityManager == null) {
throw new SdlException("SDL is not connected. Unable to get the HMICapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
}
- return _hmiCapabilities;
+ return ( HMICapabilities ) _systemCapabilityManager.getCapability(SystemCapabilityType.BUTTON);
}