summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Henigan <robert.henigan@livio.io>2020-08-12 16:26:19 -0400
committerGitHub <noreply@github.com>2020-08-12 16:26:19 -0400
commit25a849c9c1e852c24356f569f8877e7bf5193f0b (patch)
tree41f0d4c66e7964261bbc7e44e1ba7f0fb8a791bb
parent7625ff16417f59db57f2743872c3617e43141b8e (diff)
parentd1ed6bce02a78dcd23ecf3c10287c13b27c12396 (diff)
downloadsdl_android-25a849c9c1e852c24356f569f8877e7bf5193f0b.tar.gz
Merge pull request #1442 from smartdevicelink/feature/issue_1048_remove_symlinks
Remove Android symlinks
-rw-r--r--android/sdl_android/build.gradle15
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/trace/SdlTrace.java406
-rw-r--r--base/src/main/java/com/smartdevicelink/protocol/IProtocolListener.java63
-rw-r--r--base/src/main/java/com/smartdevicelink/streaming/StreamPacketizer.java300
-rw-r--r--base/src/main/java/com/smartdevicelink/trace/SdlTraceBase.java (renamed from base/src/main/java/com/smartdevicelink/trace/SdlTrace.java)894
-rw-r--r--baseAndroid/README.md11
-rw-r--r--baseAndroid/make_symbolic_links.py69
-rw-r--r--baseAndroid/make_symlinks.lnkbin2143 -> 0 bytes
-rw-r--r--baseAndroid/run_as_admin_symlink_script.bat4
l---------baseAndroid/src/main/java/com/smartdevicelink/Dispatcher1
l---------baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/BaseSdlSession.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/ISdlSessionListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/exception1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManagerListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSubManager.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/CompletionListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/ManagerUtility.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/ServiceEncryptionListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/StreamingStateMachine.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/audio1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/file1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/lifecycle1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/permission1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/screen1
l---------baseAndroid/src/main/java/com/smartdevicelink/managers/video1
l---------baseAndroid/src/main/java/com/smartdevicelink/marshal1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/BaseSdlPacket.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/BinaryFrameHeader.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/ISdlProtocol.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/ISecondaryTransportListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/ProtocolMessage.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlPacketFactory.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlProtocolBase.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/protocol/enums1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/IProxyListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCMessage.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCNotification.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCRequest.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCResponse.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCStruct.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/callbacks1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/constants1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IAudioStreamListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdlServiceListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IVideoStreamListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/proxy/rpc1
l---------baseAndroid/src/main/java/com/smartdevicelink/security1
l---------baseAndroid/src/main/java/com/smartdevicelink/streaming/AbstractPacketizer.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/streaming/IStreamListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/streaming/audio1
l---------baseAndroid/src/main/java/com/smartdevicelink/streaming/video/RTPH264Packetizer.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/trace/DiagLevel.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/trace/ISTListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/trace/Mime.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/trace/OpenRPCMessage.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/trace/enums1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/BaseTransportConfig.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/ITransportListener.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/SdlPsm.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/SiphonServer.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/TransportConstants.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/TransportManagerBase.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/enums1
l---------baseAndroid/src/main/java/com/smartdevicelink/transport/utl/BaseTransportRecord.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/BitConverter.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/ByteEnumer.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/CompareUtils.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/CorrelationIdGenerator.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/DebugTool.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/FileUtls.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/IConsole.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/NativeLogTool.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/SdlDataTypeConverter.java1
l---------baseAndroid/src/main/java/com/smartdevicelink/util/Version.java1
-rw-r--r--javaSE/src/main/java/android/os/AsyncTask.java (renamed from base/src/main/java/android/os/AsyncTask.java)0
-rw-r--r--javaSE/src/main/java/android/os/Parcel.java (renamed from base/src/main/java/android/os/Parcel.java)0
-rw-r--r--javaSE/src/main/java/android/os/Parcelable.java (renamed from base/src/main/java/android/os/Parcelable.java)0
-rw-r--r--javaSE/src/main/java/android/util/Log.java (renamed from base/src/main/java/android/util/Log.java)0
-rw-r--r--javaSE/src/main/java/com/livio/BSON/BsonEncoder.java (renamed from base/src/main/java/com/livio/BSON/BsonEncoder.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java (renamed from base/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/trace/SdlTrace.java48
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/CustomTransport.java (renamed from base/src/main/java/com/smartdevicelink/transport/CustomTransport.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java (renamed from base/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/TransportCallback.java (renamed from base/src/main/java/com/smartdevicelink/transport/TransportCallback.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/TransportInterface.java (renamed from base/src/main/java/com/smartdevicelink/transport/TransportInterface.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/TransportManager.java (renamed from base/src/main/java/com/smartdevicelink/transport/TransportManager.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/WebSocketServer.java (renamed from base/src/main/java/com/smartdevicelink/transport/WebSocketServer.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/WebSocketServerConfig.java (renamed from base/src/main/java/com/smartdevicelink/transport/WebSocketServerConfig.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/utl/SSLConfig.java (renamed from base/src/main/java/com/smartdevicelink/transport/utl/SSLConfig.java)0
-rw-r--r--javaSE/src/main/java/com/smartdevicelink/transport/utl/SSLWebSocketFactoryGenerator.java (renamed from base/src/main/java/com/smartdevicelink/transport/utl/SSLWebSocketFactoryGenerator.java)0
-rw-r--r--javaSE/src/main/java/org/json/JSON.java (renamed from base/src/main/java/org/json/JSON.java)0
-rw-r--r--javaSE/src/main/java/org/json/JSONArray.java (renamed from base/src/main/java/org/json/JSONArray.java)0
-rw-r--r--javaSE/src/main/java/org/json/JSONException.java (renamed from base/src/main/java/org/json/JSONException.java)0
-rw-r--r--javaSE/src/main/java/org/json/JSONObject.java (renamed from base/src/main/java/org/json/JSONObject.java)0
-rw-r--r--javaSE/src/main/java/org/json/JSONStringer.java (renamed from base/src/main/java/org/json/JSONStringer.java)0
-rw-r--r--javaSE/src/main/java/org/json/JSONTokener.java (renamed from base/src/main/java/org/json/JSONTokener.java)0
103 files changed, 530 insertions, 1352 deletions
diff --git a/android/sdl_android/build.gradle b/android/sdl_android/build.gradle
index 7fc5a4891..100a266ca 100644
--- a/android/sdl_android/build.gradle
+++ b/android/sdl_android/build.gradle
@@ -36,23 +36,10 @@ android {
}
sourceSets {
- if(Os.isFamily(Os.FAMILY_WINDOWS)){
- //The buildWindowsSymLinks task must be run first if this is
- //being compiled on a Windows machine
- main.java.srcDirs += '../../baseAndroid/windows/src/main/java'
- }else{
- main.java.srcDirs += '../../baseAndroid/src/main/java'
- }
+ main.java.srcDirs += '../../base/src/main/java'
}
}
-task buildWindowSymLinks(type:Exec){
-
- workingDir '../../baseAndroid'
-
- commandLine 'cmd', '/c', 'make_symlinks.lnk'
-}
-
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api 'com.smartdevicelink:bson_java_port:1.2.0'
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/trace/SdlTrace.java b/android/sdl_android/src/main/java/com/smartdevicelink/trace/SdlTrace.java
index e3bedd6a2..956985128 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/trace/SdlTrace.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/trace/SdlTrace.java
@@ -35,22 +35,6 @@ import android.annotation.SuppressLint;
import android.bluetooth.BluetoothDevice;
import android.os.Build;
import android.os.Debug;
-import android.os.Process;
-
-import com.smartdevicelink.protocol.SdlPacket;
-import com.smartdevicelink.protocol.enums.FrameDataControlFrameType;
-import com.smartdevicelink.protocol.enums.FrameType;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.trace.enums.DetailLevel;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-import com.smartdevicelink.trace.enums.Mod;
-import com.smartdevicelink.transport.SiphonServer;
-import com.smartdevicelink.util.BitConverter;
-import com.smartdevicelink.util.DebugTool;
-import com.smartdevicelink.util.NativeLogTool;
import java.sql.Timestamp;
@@ -63,291 +47,12 @@ import java.sql.Timestamp;
*/
@SuppressLint("DefaultLocale")
-public class SdlTrace {
- private static final String SDL_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
-
- public static final String SYSTEM_LOG_TAG = "SdlTrace";
-
- private static long baseTics = java.lang.System.currentTimeMillis();
- private static boolean acceptAPITraceAdjustments = true;
-
- protected static ISTListener m_appTraceListener = null;
-
- ///
- /// The PUBLIC interface to SdlTrace starts here
- ///
-
-
- public static void setAcceptAPITraceAdjustments(Boolean APITraceAdjustmentsAccepted) {
- if (APITraceAdjustmentsAccepted != null) {
- acceptAPITraceAdjustments = APITraceAdjustmentsAccepted;
- }
- }
-
- public static boolean getAcceptAPITraceAdjustments() {
- return acceptAPITraceAdjustments;
- }
-
- public static void setAppTraceListener(ISTListener listener) {
- m_appTraceListener = listener;
- } // end-method
-
- public static void setAppTraceLevel(DetailLevel dt) {
- if ( dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.app, dt);
- } // end-method
-
- public static void setProxyTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.proxy, dt);
- } // end-method
-
- public static void setRpcTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.rpc, dt);
- } // end-method
-
- public static void setMarshallingTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.mar, dt);
- } // end-method
-
- public static void setProtocolTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.proto, dt);
- } // end-method
-
- public static void setTransportTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.tran, dt);
- } // end-method
-
- private static String encodeTraceMessage(long timestamp, Mod module, InterfaceActivityDirection msgDirection, String msgBodyXml) {
- StringBuilder sb = new StringBuilder("<msg><dms>");
- sb.append(timestamp);
- sb.append("</dms><pid>");
- sb.append(Process.myPid());
- sb.append("</pid><tid>");
- sb.append(Thread.currentThread().getId());
- sb.append("</tid><mod>");
- sb.append(module.toString());
- sb.append("</mod>");
- if (msgDirection != InterfaceActivityDirection.None) {
- sb.append("<dir>");
- sb.append(interfaceActivityDirectionToString(msgDirection));
- sb.append("</dir>");
- } // end-if
- sb.append(msgBodyXml);
- sb.append("</msg>");
-
- return sb.toString();
- } // end-method
-
- private static String interfaceActivityDirectionToString(InterfaceActivityDirection iaDirection) {
- String str = "";
- switch (iaDirection) {
- case Receive:
- str = "rx";
- break;
- case Transmit:
- str = "tx";
- break;
- default:
- break;
- } // end-switch
- return str;
- } // end-method
-
- static String B64EncodeForXML(String data) {
- return Mime.base64Encode(data);
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: return Base64.encodeToString(data.getBytes(), Base64.DEFAULT);
- } // end-method
-
- public static boolean logProxyEvent(String eventText, String token) {
- if (DiagLevel.getLevel(Mod.proxy) == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- String msg = SdlTrace.B64EncodeForXML(eventText);
- String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proxy, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- return writeXmlTraceMessage(xml);
+public class SdlTrace extends SdlTraceBase {
+ private static String getPid(){
+ return String.valueOf(android.os.Process.myPid());
}
- public static boolean logAppEvent(String eventText) {
- if (DiagLevel.getLevel(Mod.app) == DetailLevel.OFF) {
- return false;
- }
-
- long timestamp = SdlTrace.getBaseTicsDelta();
- String msg = SdlTrace.B64EncodeForXML(eventText);
- String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.app, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- return writeXmlTraceMessage(xml);
- }
-
- public static boolean logRPCEvent(InterfaceActivityDirection msgDirection, RPCMessage rpcMsg, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.rpc);
- if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- long timestamp = SdlTrace.getBaseTicsDelta();
- String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.rpc, msgDirection, rpc2Xml(dl, rpcMsg));
- return writeXmlTraceMessage(xml);
- }
-
- private static String rpc2Xml(DetailLevel dl, RPCMessage rpcMsg) {
- StringBuilder rpcAsXml = new StringBuilder();
- rpcAsXml.append("<op>");
- rpcAsXml.append(rpcMsg.getFunctionName());
- rpcAsXml.append("</op>");
- boolean hasCorrelationID = false;
- Integer correlationID = -1;
- if (rpcMsg instanceof RPCRequest) {
- hasCorrelationID = true;
- correlationID = ((RPCRequest)rpcMsg).getCorrelationID();
- } else if (rpcMsg instanceof RPCResponse) {
- hasCorrelationID = true;
- correlationID = ((RPCResponse)rpcMsg).getCorrelationID();
- } // end-if
- if (hasCorrelationID) {
- rpcAsXml.append("<cid>");
- rpcAsXml.append(correlationID);
- rpcAsXml.append("</cid>");
- } // end-if
- rpcAsXml.append("<type>");
- rpcAsXml.append(rpcMsg.getMessageType());
- rpcAsXml.append("</type>");
- //rpcAsXml.append(newline);
-
- if (dl == DetailLevel.VERBOSE) {
- OpenRPCMessage orpcmsg = new OpenRPCMessage(rpcMsg);
- String rpcParamList = orpcmsg.msgDump();
- String msg = SdlTrace.B64EncodeForXML(rpcParamList);
- rpcAsXml.append("<d>");
- rpcAsXml.append(msg);
- rpcAsXml.append("</d>");
- } // end-if
- return rpcAsXml.toString();
- } // end-method
-
- public static boolean logMarshallingEvent(InterfaceActivityDirection msgDirection, byte[] marshalledMessage, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.mar);
- if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- long timestamp = SdlTrace.getBaseTicsDelta();
- StringBuilder msg = new StringBuilder();
- msg.append("<sz>");
- msg.append(marshalledMessage.length);
- msg.append("</sz>");
- if (dl == DetailLevel.VERBOSE) {
- msg.append("<d>");
- msg.append(Mime.base64Encode(marshalledMessage));
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: msg.append(Base64.encodeToString(marshalledMessage, Base64.DEFAULT));
- msg.append("</d>");
- }
- String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.mar, msgDirection, msg.toString());
- return writeXmlTraceMessage(xml);
- }
-
- public static boolean logProtocolEvent(InterfaceActivityDirection frameDirection, SdlPacket packet, int frameDataOffset, int frameDataLength, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.proto);
- if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- StringBuffer protoMsg = new StringBuffer();
- protoMsg.append("<frame>");
- protoMsg.append(SdlTrace.getProtocolFrameHeaderInfo(packet));
- if (dl == DetailLevel.VERBOSE) {
- if (packet.getPayload() != null && frameDataLength > 0) {
- protoMsg.append("<d>");
- String bytesInfo = "";
- bytesInfo = Mime.base64Encode(packet.getPayload(), frameDataOffset, frameDataLength);
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: bytesInfo = Base64.encodeToString(frameData, frameDataOffset, frameDataLength, Base64.DEFAULT);
- protoMsg.append(bytesInfo);
- protoMsg.append("</d>");
- }
- }
- protoMsg.append("</frame>");
- String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proto, frameDirection, protoMsg.toString());
- return writeXmlTraceMessage(xml);
- }
-
- private static String getProtocolFrameType(FrameType f) {
- if (f == FrameType.Control)
- return "Control";
- else if (f == FrameType.Consecutive)
- return "Consecutive";
- else if (f == FrameType.First)
- return "First";
- else if (f == FrameType.Single)
- return "Single";
-
- return "Unknown";
- } // end-method
-
- private static String getProtocolSessionType(SessionType serviceType) {
- String s;
- if (serviceType == SessionType.RPC )
- s = "rpc";
- else if (serviceType == SessionType.BULK_DATA)
- s = "bulk";
- else
- s = "Unknown";
- return s;
- } // end-method
-
- private static String getProtocolFrameHeaderInfo(SdlPacket hdr) {
- StringBuilder sb = new StringBuilder();
- sb.append("<hdr>");
- sb.append("<ver>");
- sb.append(hdr.getVersion());
- sb.append("</ver><cmp>");
- sb.append(hdr.isEncrypted());
- sb.append("</cmp><ft>");
- sb.append(getProtocolFrameType(hdr.getFrameType()));
- sb.append("</ft><st>");
- sb.append(getProtocolSessionType(SessionType.valueOf((byte)hdr.getServiceType())));
- sb.append("</st><sid>");
- sb.append(hdr.getSessionId());
- sb.append("</sid><sz>");
- sb.append(hdr.getDataSize());
- sb.append("</sz>");
-
- int frameData = hdr.getFrameInfo();
- if (hdr.getFrameType() == FrameType.Control) {
- sb.append("<ca>");
- if (frameData == FrameDataControlFrameType.StartSession.getValue())
- sb.append("StartSession");
- else if (frameData == FrameDataControlFrameType.StartSessionACK.getValue())
- sb.append("StartSessionACK");
- else if (frameData == FrameDataControlFrameType.StartSessionNACK.getValue())
- sb.append("StartSessionNACK");
- else if (frameData == FrameDataControlFrameType.EndSession.getValue())
- sb.append("EndSession");
- sb.append("</ca>");
- } else if (hdr.getFrameType() == FrameType.Consecutive ) {
- sb.append("<fsn>");
- if (frameData == 0 )
- sb.append("lastFrame");
- else
- sb.append(String.format("%02X",frameData));
- sb.append("</fsn>");
- } else if (hdr.getFrameType() == FrameType.First ) {
- int totalSize = BitConverter.intFromByteArray(hdr.getPayload(), 0);
- int numFrames = BitConverter.intFromByteArray(hdr.getPayload(), 4);
- sb.append("<total>").append(totalSize).append("</total><numframes>").append(numFrames).append("</numframes>");
- } else if (hdr.getFrameType() == FrameType.Single ) {
- sb.append("<single/>");
- }
-
- sb.append("</hdr>");
-
- return sb.toString();
- } // end-method
-
+ @SuppressLint("MissingPermission")
public static String getBTDeviceInfo(BluetoothDevice btDevice) {
StringBuilder sb = new StringBuilder();
sb.append("<btp>");
@@ -361,92 +66,9 @@ public class SdlTrace {
return sb.toString();
} // end-method
- public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int byteLength, String token) {
- return logTransportEvent(preamble, transportSpecificInfoXml, msgDirection, buf, 0, byteLength, token);
- }
-
- private static void checkB64(String x, byte[] buf, int offset, int byteLength) {
- if ((x.length() % 4) != 0) {
- NativeLogTool.logWarning(SdlTrace.SYSTEM_LOG_TAG, "b64 string length (" + x.length() + ") isn't multiple of 4: buf.length=" + buf.length + ", offset=" + offset + ", len=" + byteLength);
- } // end-if
- } // end-method
-
- public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int offset, int byteLength, String token) {
- if (DiagLevel.getLevel(Mod.tran) == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- StringBuilder msg = new StringBuilder();
- if (transportSpecificInfoXml != null && transportSpecificInfoXml.length() > 0) {
- msg.append(transportSpecificInfoXml);
- }
- if (preamble != null && preamble.length() > 0) {
- msg.append("<desc>");
- msg.append(preamble);
- msg.append("</desc>");
- }
- if (buf != null) {
- msg.append("<sz>");
- msg.append(byteLength);
- msg.append("</sz>");
- DetailLevel dl = DiagLevel.getLevel(Mod.tran);
- if (dl == DetailLevel.VERBOSE) {
- if (buf != null && byteLength > 0) {
- msg.append("<d>");
- String bytesInfo = Mime.base64Encode(buf, offset, byteLength);
- checkB64(bytesInfo, buf, offset, byteLength);
- msg.append(bytesInfo);
- msg.append("</d>");
- }
- }
- }
- String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.tran, msgDirection, msg.toString());
- return writeXmlTraceMessage(xml);
- }
-
- // Package-scoped
- static long getBaseTicsDelta() {
- return java.lang.System.currentTimeMillis() - getBaseTics();
- }
-
- // Package-scoped
- static long getBaseTics() {
- return baseTics;
- } // end-method
-
- public static Boolean writeMessageToSiphonServer(String info) {
- return SiphonServer.sendFormattedTraceMessage(info);
- }
-
- private static boolean writeXmlTraceMessage(String msg) {
- try {
- // Attempt to write formatted message to the Siphon
- if (false == writeMessageToSiphonServer(msg)) {
- // If writing to the Siphon fails, write to the native log
- NativeLogTool.logInfo(SdlTrace.SYSTEM_LOG_TAG, msg);
- return false;
- }
-
- ISTListener localTraceListener = m_appTraceListener;
-
- if (localTraceListener != null) {
- try {
- localTraceListener.logXmlMsg(msg, SDL_LIB_TRACE_KEY);
- } catch (Exception ex) {
- DebugTool.logError(SYSTEM_LOG_TAG, "Failure calling ISTListener: " + ex.toString(), ex);
- return false;
- }
- }
- } catch (Exception ex) {
- NativeLogTool.logError(SdlTrace.SYSTEM_LOG_TAG, "Failure writing XML trace message: " + ex.toString());
- return false;
- }
- return true;
- }
-
// Package-scoped
@SuppressWarnings("deprecation")
- public static String getLogHeader(String dumpReason, int seqNo) {
+ public static String getLogHeader(String dumpReason, int seqNo) {
final String Sep = "-";
StringBuilder write = new StringBuilder("<?xml version=\"1.0\"?>" + "<logs>");
write.append("<info>");
@@ -461,7 +83,7 @@ public class SdlTrace {
long heapAllocated = Debug.getNativeHeapAllocatedSize() / 1024;
infoBlock.append("<mem><hf>").append(heapSize).append("KB</hf><ha>").append(heapAllocated).append("KB</ha></mem>");
infoBlock.append("<np>").append(Runtime.getRuntime().availableProcessors()).append("</np>");
- infoBlock.append("<pid>").append(Process.myPid()).append("</pid>");
+ infoBlock.append("<pid>").append(getPid()).append("</pid>");
infoBlock.append("<tid>").append(Thread.currentThread().getId()).append("</tid>");
// String dateStamp = (String)
@@ -480,21 +102,5 @@ public class SdlTrace {
write.append("</info>" + "<msgs>");
return write.toString();
} // end-method
-
- private static String getSmartDeviceLinkTraceRoot(String dumpReason, int seqNo) {
- StringBuilder write = new StringBuilder("<SmartDeviceLinktraceroot>" + "<sequencenum>" + seqNo
- + "</sequencenum>" + "<dumpreason>" + dumpReason
- + "</dumpreason><tracelevel>");
-
- write.append("<tran>").append(DiagLevel.getLevel(Mod.tran)).append("</tran>");
- write.append("<proto>").append(DiagLevel.getLevel(Mod.proto)).append("</proto>");
- write.append("<mar>").append(DiagLevel.getLevel(Mod.mar)).append("</mar>");
- write.append("<rpc>").append(DiagLevel.getLevel(Mod.rpc)).append("</rpc>");
- write.append("<proxy>").append(DiagLevel.getLevel(Mod.proxy)).append("</proxy>");
- write.append("<app>").append(DiagLevel.getLevel(Mod.app)).append("</app>");
- write.append("</tracelevel>");
- write.append("</SmartDeviceLinktraceroot>");
- return write.toString();
- } // end-method
} // end-class \ No newline at end of file
diff --git a/base/src/main/java/com/smartdevicelink/protocol/IProtocolListener.java b/base/src/main/java/com/smartdevicelink/protocol/IProtocolListener.java
index a199e2a00..37e7972f4 100644
--- a/base/src/main/java/com/smartdevicelink/protocol/IProtocolListener.java
+++ b/base/src/main/java/com/smartdevicelink/protocol/IProtocolListener.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.protocol;
@@ -36,6 +36,7 @@ import com.smartdevicelink.protocol.enums.SessionType;
import java.util.List;
+@Deprecated
public interface IProtocolListener {
// Called to indicate that these bytes are to be sent as part of a message.
// This call includes the part of the message.
diff --git a/base/src/main/java/com/smartdevicelink/streaming/StreamPacketizer.java b/base/src/main/java/com/smartdevicelink/streaming/StreamPacketizer.java
deleted file mode 100644
index 64ee4f795..000000000
--- a/base/src/main/java/com/smartdevicelink/streaming/StreamPacketizer.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package com.smartdevicelink.streaming;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import com.smartdevicelink.SdlConnection.SdlSession;
-import com.smartdevicelink.managers.CompletionListener;
-import com.smartdevicelink.protocol.ProtocolMessage;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.proxy.interfaces.IAudioStreamListener;
-import com.smartdevicelink.proxy.interfaces.IVideoStreamListener;
-import com.smartdevicelink.util.DebugTool;
-
-public class StreamPacketizer extends AbstractPacketizer implements IVideoStreamListener, IAudioStreamListener, Runnable{
-
- public final static String TAG = "StreamPacketizer";
-
- private Thread t = null;
-
-
- private final static int TLS_MAX_RECORD_SIZE = 16384;
- private final static int TLS_RECORD_HEADER_SIZE = 5;
- private final static int TLS_RECORD_MES_AUTH_CDE_SIZE = 32;
- private final static int TLS_MAX_RECORD_PADDING_SIZE = 256;
-
-
- private final static int BUFF_READ_SIZE = TLS_MAX_RECORD_SIZE - TLS_RECORD_HEADER_SIZE - TLS_RECORD_MES_AUTH_CDE_SIZE - TLS_MAX_RECORD_PADDING_SIZE;
-
- // Approximate size of data that mOutputQueue can hold in bytes.
- // By adding a buffer, we accept underlying transport being stuck for a short time. By setting
- // a limit of the buffer size, we avoid buffer overflows when underlying transport is too slow.
- private static final int MAX_QUEUE_SIZE = 256 * 1024;
-
- private Object mPauseLock;
- private boolean mPaused;
- private boolean isServiceProtected = false;
- private BlockingQueue<ByteBufferWithListener> mOutputQueue;
-
- public StreamPacketizer(IStreamListener streamListener, InputStream is, SessionType sType, byte rpcSessionID, SdlSession session) throws IOException {
- super(streamListener, is, sType, rpcSessionID, session);
- mPauseLock = new Object();
- mPaused = false;
- isServiceProtected = _session.isServiceProtected(_serviceType);
- if (bufferSize == 0) {
- // fail safe
- bufferSize = BUFF_READ_SIZE;
- }
- if(isServiceProtected){ //If our service is encrypted we can only use 1024 as the max buffer size.
- bufferSize = BUFF_READ_SIZE;
- buffer = new byte[bufferSize];
- }
- mOutputQueue = new LinkedBlockingQueue<ByteBufferWithListener>(MAX_QUEUE_SIZE / bufferSize);
- }
-
- public void start() throws IOException {
- if (t == null) {
- t = new Thread(this);
- t.start();
- }
- }
-
- public void stop() {
-
- if (t != null)
- {
- t.interrupt();
- t = null;
- }
-
- }
-
- public void run() {
- int length;
- try
- {
- while (t != null && !t.isInterrupted())
- {
- synchronized(mPauseLock)
- {
- while (mPaused)
- {
- try
- {
- mPauseLock.wait();
- }
- catch (InterruptedException e) {
- DebugTool.logError(TAG, "Streaming thread has been interrupted", e);
- }
- }
- }
-
- if (is != null) { // using InputStream interface
- length = is.read(buffer, 0, bufferSize);
-
- if (length >= 0) {
- ProtocolMessage pm = new ProtocolMessage();
- pm.setSessionID(_rpcSessionID);
- pm.setSessionType(_serviceType);
- pm.setFunctionID(0);
- pm.setCorrID(0);
- pm.setData(buffer, length);
- pm.setPayloadProtected(isServiceProtected);
-
- if (t != null && !t.isInterrupted()) {
- _streamListener.sendStreamPacket(pm);
- }
- }
- } else { // using sendFrame interface
- ByteBufferWithListener byteBufferWithListener;
- ByteBuffer frame;
- CompletionListener completionListener;
- try {
- byteBufferWithListener = mOutputQueue.take();
- frame = byteBufferWithListener.byteBuffer;
- completionListener = byteBufferWithListener.completionListener;
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- break;
- }
-
- while (frame.hasRemaining()) {
- int len = frame.remaining() > bufferSize ? bufferSize : frame.remaining();
-
- ProtocolMessage pm = new ProtocolMessage();
- pm.setSessionID(_rpcSessionID);
- pm.setSessionType(_serviceType);
- pm.setFunctionID(0);
- pm.setCorrID(0);
- pm.setData(frame.array(), frame.arrayOffset() + frame.position(), len);
- pm.setPayloadProtected(isServiceProtected);
-
- if (t != null && !t.isInterrupted()) {
- _streamListener.sendStreamPacket(pm);
- }
-
- frame.position(frame.position() + len);
- }
-
- if (!frame.hasRemaining() && completionListener != null){
- completionListener.onComplete(true);
- }
- }
- }
- } catch (IOException e)
- {
- e.printStackTrace();
- }
- finally
- {
- if(_session != null) {
- _session.endService(_serviceType);
- }
-
-
- }
- }
-
- @Override
- public void pause() {
- synchronized (mPauseLock) {
- mPaused = true;
- }
- }
-
- @Override
- public void resume() {
- synchronized (mPauseLock) {
- mPaused = false;
- mPauseLock.notifyAll();
- }
- }
-
- /**
- * Called by the app.
- *
- * @see IVideoStreamListener#sendFrame(byte[], int, int, long)
- */
- @Override
- public void sendFrame(byte[] data, int offset, int length, long presentationTimeUs)
- throws ArrayIndexOutOfBoundsException {
- sendArrayData(data, offset, length);
- }
-
- /**
- * Called by the app.
- *
- * @see IVideoStreamListener#sendFrame(ByteBuffer, long)
- */
- @Override
- public void sendFrame(ByteBuffer data, long presentationTimeUs) {
- sendByteBufferData(data, null);
- }
-
- /**
- * Called by the app.
- *
- * @see IAudioStreamListener#sendAudio(byte[], int, int, long)
- */
- @Override
- public void sendAudio(byte[] data, int offset, int length, long presentationTimeUs)
- throws ArrayIndexOutOfBoundsException {
- sendArrayData(data, offset, length);
- }
-
- /**
- * Called by the app.
- *
- * @see IAudioStreamListener#sendAudio(ByteBuffer, long)
- */
- @Deprecated
- @Override
- public void sendAudio(ByteBuffer data, long presentationTimeUs) {
- sendByteBufferData(data, null);
- }
-
- @Override
- public void sendAudio(ByteBuffer data, long presentationTimeUs, CompletionListener completionListener) {
- sendByteBufferData(data, completionListener);
- }
-
- private void sendArrayData(byte[] data, int offset, int length)
- throws ArrayIndexOutOfBoundsException {
- if (offset < 0 || offset > data.length || length <= 0 || offset + length > data.length) {
- throw new ArrayIndexOutOfBoundsException();
- }
-
- // StreamPacketizer does not need to split a video frame into NAL units
- ByteBuffer buffer = ByteBuffer.allocate(length);
- buffer.put(data, offset, length);
- buffer.flip();
-
- try {
- mOutputQueue.put(new ByteBufferWithListener(buffer, null));
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
-
- private void sendByteBufferData(ByteBuffer data, CompletionListener completionListener) {
- if (data == null || data.remaining() == 0) {
- return;
- }
-
- // copy the whole buffer, so that even if the app modifies original ByteBuffer after
- // sendFrame() or sendAudio() call, our buffer will stay intact
- ByteBuffer buffer = ByteBuffer.allocate(data.remaining());
- buffer.put(data);
- buffer.flip();
-
- try {
- mOutputQueue.put(new ByteBufferWithListener(buffer, completionListener));
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
-
-
- private class ByteBufferWithListener{
- ByteBuffer byteBuffer;
- CompletionListener completionListener;
- ByteBufferWithListener (ByteBuffer byteBuffer, CompletionListener completionListener){
- this.byteBuffer = byteBuffer;
- this.completionListener = completionListener;
- }
- }
-}
diff --git a/base/src/main/java/com/smartdevicelink/trace/SdlTrace.java b/base/src/main/java/com/smartdevicelink/trace/SdlTraceBase.java
index 4e654603b..bbddd6453 100644
--- a/base/src/main/java/com/smartdevicelink/trace/SdlTrace.java
+++ b/base/src/main/java/com/smartdevicelink/trace/SdlTraceBase.java
@@ -1,452 +1,444 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package com.smartdevicelink.trace;
-
-
-
-import com.smartdevicelink.protocol.SdlPacket;
-import com.smartdevicelink.protocol.enums.FrameDataControlFrameType;
-import com.smartdevicelink.protocol.enums.FrameType;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.trace.enums.DetailLevel;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-import com.smartdevicelink.trace.enums.Mod;
-import com.smartdevicelink.transport.SiphonServer;
-import com.smartdevicelink.util.BitConverter;
-import com.smartdevicelink.util.DebugTool;
-import com.smartdevicelink.util.NativeLogTool;
-
-/* This class handles the global TraceSettings as requested by the users either through the combination of the following
- 1. System defaults
- 2. Application XML config
- 3. Programmatic requests from application itself
-
- It is manifested in the <SmartDeviceLink>...</SmartDeviceLink> tags
- */
-
-//@SuppressLint("DefaultLocale")
-public class SdlTrace {
- private static final String SDL_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
-
- public static final String SYSTEM_LOG_TAG = "SdlTrace";
-
- private static long baseTics = System.currentTimeMillis();
- private static boolean acceptAPITraceAdjustments = true;
-
- protected static ISTListener m_appTraceListener = null;
-
- ///
- /// The PUBLIC interface to SdlTrace starts here
- ///
-
-
- public static void setAcceptAPITraceAdjustments(Boolean APITraceAdjustmentsAccepted) {
- if (APITraceAdjustmentsAccepted != null) {
- acceptAPITraceAdjustments = APITraceAdjustmentsAccepted;
- }
- }
-
- public static boolean getAcceptAPITraceAdjustments() {
- return acceptAPITraceAdjustments;
- }
-
- public static void setAppTraceListener(ISTListener listener) {
- m_appTraceListener = listener;
- } // end-method
-
- public static void setAppTraceLevel(DetailLevel dt) {
- if ( dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.app, dt);
- } // end-method
-
- public static void setProxyTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.proxy, dt);
- } // end-method
-
- public static void setRpcTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.rpc, dt);
- } // end-method
-
- public static void setMarshallingTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.mar, dt);
- } // end-method
-
- public static void setProtocolTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.proto, dt);
- } // end-method
-
- public static void setTransportTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.tran, dt);
- } // end-method
-
- private static String getPid(){
- //Default implementation is not able to get this information
- return "UNKNOWN";
- }
-
- private static String encodeTraceMessage(long timestamp, Mod module, InterfaceActivityDirection msgDirection, String msgBodyXml) {
- StringBuilder sb = new StringBuilder("<msg><dms>");
- sb.append(timestamp);
- sb.append("</dms><pid>");
- sb.append(getPid());
- sb.append("</pid><tid>");
- sb.append(Thread.currentThread().getId());
- sb.append("</tid><mod>");
- sb.append(module.toString());
- sb.append("</mod>");
- if (msgDirection != InterfaceActivityDirection.None) {
- sb.append("<dir>");
- sb.append(interfaceActivityDirectionToString(msgDirection));
- sb.append("</dir>");
- } // end-if
- sb.append(msgBodyXml);
- sb.append("</msg>");
-
- return sb.toString();
- } // end-method
-
- private static String interfaceActivityDirectionToString(InterfaceActivityDirection iaDirection) {
- String str = "";
- switch (iaDirection) {
- case Receive:
- str = "rx";
- break;
- case Transmit:
- str = "tx";
- break;
- default:
- break;
- } // end-switch
- return str;
- } // end-method
-
- static String B64EncodeForXML(String data) {
- return Mime.base64Encode(data);
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: return Base64.encodeToString(data.getBytes(), Base64.DEFAULT);
- } // end-method
-
- public static boolean logProxyEvent(String eventText, String token) {
- if (DiagLevel.getLevel(Mod.proxy) == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- String msg = SdlTrace.B64EncodeForXML(eventText);
- String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proxy, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- return writeXmlTraceMessage(xml);
- }
-
- public static boolean logAppEvent(String eventText) {
- if (DiagLevel.getLevel(Mod.app) == DetailLevel.OFF) {
- return false;
- }
-
- long timestamp = SdlTrace.getBaseTicsDelta();
- String msg = SdlTrace.B64EncodeForXML(eventText);
- String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.app, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- return writeXmlTraceMessage(xml);
- }
-
- public static boolean logRPCEvent(InterfaceActivityDirection msgDirection, RPCMessage rpcMsg, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.rpc);
- if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- long timestamp = SdlTrace.getBaseTicsDelta();
- String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.rpc, msgDirection, rpc2Xml(dl, rpcMsg));
- return writeXmlTraceMessage(xml);
- }
-
- private static String rpc2Xml(DetailLevel dl, RPCMessage rpcMsg) {
- StringBuilder rpcAsXml = new StringBuilder();
- rpcAsXml.append("<op>");
- rpcAsXml.append(rpcMsg.getFunctionName());
- rpcAsXml.append("</op>");
- boolean hasCorrelationID = false;
- Integer correlationID = -1;
- if (rpcMsg instanceof RPCRequest) {
- hasCorrelationID = true;
- correlationID = ((RPCRequest)rpcMsg).getCorrelationID();
- } else if (rpcMsg instanceof RPCResponse) {
- hasCorrelationID = true;
- correlationID = ((RPCResponse)rpcMsg).getCorrelationID();
- } // end-if
- if (hasCorrelationID) {
- rpcAsXml.append("<cid>");
- rpcAsXml.append(correlationID);
- rpcAsXml.append("</cid>");
- } // end-if
- rpcAsXml.append("<type>");
- rpcAsXml.append(rpcMsg.getMessageType());
- rpcAsXml.append("</type>");
- //rpcAsXml.append(newline);
-
- if (dl == DetailLevel.VERBOSE) {
- OpenRPCMessage orpcmsg = new OpenRPCMessage(rpcMsg);
- String rpcParamList = orpcmsg.msgDump();
- String msg = SdlTrace.B64EncodeForXML(rpcParamList);
- rpcAsXml.append("<d>");
- rpcAsXml.append(msg);
- rpcAsXml.append("</d>");
- } // end-if
- return rpcAsXml.toString();
- } // end-method
-
- public static boolean logMarshallingEvent(InterfaceActivityDirection msgDirection, byte[] marshalledMessage, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.mar);
- if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- long timestamp = SdlTrace.getBaseTicsDelta();
- StringBuilder msg = new StringBuilder();
- msg.append("<sz>");
- msg.append(marshalledMessage.length);
- msg.append("</sz>");
- if (dl == DetailLevel.VERBOSE) {
- msg.append("<d>");
- msg.append(Mime.base64Encode(marshalledMessage));
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: msg.append(Base64.encodeToString(marshalledMessage, Base64.DEFAULT));
- msg.append("</d>");
- }
- String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.mar, msgDirection, msg.toString());
- return writeXmlTraceMessage(xml);
- }
-
- public static boolean logProtocolEvent(InterfaceActivityDirection frameDirection, SdlPacket packet, int frameDataOffset, int frameDataLength, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.proto);
- if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- StringBuffer protoMsg = new StringBuffer();
- protoMsg.append("<frame>");
- protoMsg.append(SdlTrace.getProtocolFrameHeaderInfo(packet));
- if (dl == DetailLevel.VERBOSE) {
- if (packet.getPayload() != null && frameDataLength > 0) {
- protoMsg.append("<d>");
- String bytesInfo = "";
- bytesInfo = Mime.base64Encode(packet.getPayload(), frameDataOffset, frameDataLength);
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: bytesInfo = Base64.encodeToString(frameData, frameDataOffset, frameDataLength, Base64.DEFAULT);
- protoMsg.append(bytesInfo);
- protoMsg.append("</d>");
- }
- }
- protoMsg.append("</frame>");
- String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proto, frameDirection, protoMsg.toString());
- return writeXmlTraceMessage(xml);
- }
-
- private static String getProtocolFrameType(FrameType f) {
- if (f == FrameType.Control)
- return "Control";
- else if (f == FrameType.Consecutive)
- return "Consecutive";
- else if (f == FrameType.First)
- return "First";
- else if (f == FrameType.Single)
- return "Single";
-
- return "Unknown";
- } // end-method
-
- private static String getProtocolSessionType(SessionType serviceType) {
- String s;
- if (serviceType == SessionType.RPC )
- s = "rpc";
- else if (serviceType == SessionType.BULK_DATA)
- s = "bulk";
- else
- s = "Unknown";
- return s;
- } // end-method
-
- private static String getProtocolFrameHeaderInfo(SdlPacket hdr) {
- StringBuilder sb = new StringBuilder();
- sb.append("<hdr>");
- sb.append("<ver>");
- sb.append(hdr.getVersion());
- sb.append("</ver><cmp>");
- sb.append(hdr.isEncrypted());
- sb.append("</cmp><ft>");
- sb.append(getProtocolFrameType(hdr.getFrameType()));
- sb.append("</ft><st>");
- sb.append(getProtocolSessionType(SessionType.valueOf((byte)hdr.getServiceType())));
- sb.append("</st><sid>");
- sb.append(hdr.getSessionId());
- sb.append("</sid><sz>");
- sb.append(hdr.getDataSize());
- sb.append("</sz>");
-
- int frameData = hdr.getFrameInfo();
- if (hdr.getFrameType() == FrameType.Control) {
- sb.append("<ca>");
- if (frameData == FrameDataControlFrameType.StartSession.getValue())
- sb.append("StartSession");
- else if (frameData == FrameDataControlFrameType.StartSessionACK.getValue())
- sb.append("StartSessionACK");
- else if (frameData == FrameDataControlFrameType.StartSessionNACK.getValue())
- sb.append("StartSessionNACK");
- else if (frameData == FrameDataControlFrameType.EndSession.getValue())
- sb.append("EndSession");
- sb.append("</ca>");
- } else if (hdr.getFrameType() == FrameType.Consecutive ) {
- sb.append("<fsn>");
- if (frameData == 0 )
- sb.append("lastFrame");
- else
- sb.append(String.format("%02X",frameData));
- sb.append("</fsn>");
- } else if (hdr.getFrameType() == FrameType.First ) {
- int totalSize = BitConverter.intFromByteArray(hdr.getPayload(), 0);
- int numFrames = BitConverter.intFromByteArray(hdr.getPayload(), 4);
- sb.append("<total>" + totalSize + "</total><numframes>" + numFrames + "</numframes>");
- } else if (hdr.getFrameType() == FrameType.Single ) {
- sb.append("<single/>");
- }
-
- sb.append("</hdr>");
-
- return sb.toString();
- } // end-method
-
- public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int byteLength, String token) {
- return logTransportEvent(preamble, transportSpecificInfoXml, msgDirection, buf, 0, byteLength, token);
- }
-
- private static void checkB64(String x, byte[] buf, int offset, int byteLength) {
- if ((x.length() % 4) != 0) {
- NativeLogTool.logWarning(SdlTrace.SYSTEM_LOG_TAG, "b64 string length (" + x.length() + ") isn't multiple of 4: buf.length=" + buf.length + ", offset=" + offset + ", len=" + byteLength);
- } // end-if
- } // end-method
-
- public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int offset, int byteLength, String token) {
- if (DiagLevel.getLevel(Mod.tran) == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
- return false;
- }
-
- StringBuilder msg = new StringBuilder();
- if (transportSpecificInfoXml != null && transportSpecificInfoXml.length() > 0) {
- msg.append(transportSpecificInfoXml);
- }
- if (preamble != null && preamble.length() > 0) {
- msg.append("<desc>");
- msg.append(preamble);
- msg.append("</desc>");
- }
- if (buf != null) {
- msg.append("<sz>");
- msg.append(byteLength);
- msg.append("</sz>");
- DetailLevel dl = DiagLevel.getLevel(Mod.tran);
- if (dl == DetailLevel.VERBOSE) {
- if (buf != null && byteLength > 0) {
- msg.append("<d>");
- String bytesInfo = Mime.base64Encode(buf, offset, byteLength);
- checkB64(bytesInfo, buf, offset, byteLength);
- msg.append(bytesInfo);
- msg.append("</d>");
- }
- }
- }
- String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.tran, msgDirection, msg.toString());
- return writeXmlTraceMessage(xml);
- }
-
- // Package-scoped
- static long getBaseTicsDelta() {
- return System.currentTimeMillis() - getBaseTics();
- }
-
- // Package-scoped
- static long getBaseTics() {
- return baseTics;
- } // end-method
-
- public static Boolean writeMessageToSiphonServer(String info) {
- return SiphonServer.sendFormattedTraceMessage(info);
- }
-
- private static boolean writeXmlTraceMessage(String msg) {
- try {
- // Attempt to write formatted message to the Siphon
- if (false == writeMessageToSiphonServer(msg)) {
- // If writing to the Siphon fails, write to the native log
- NativeLogTool.logInfo(SdlTrace.SYSTEM_LOG_TAG, msg);
- return false;
- }
-
- ISTListener localTraceListener = m_appTraceListener;
-
- if (localTraceListener != null) {
- try {
- localTraceListener.logXmlMsg(msg, SDL_LIB_TRACE_KEY);
- } catch (Exception ex) {
- DebugTool.logError(SYSTEM_LOG_TAG,"Failure calling ISTListener: " + ex.toString(), ex);
- return false;
- }
- }
- } catch (Exception ex) {
- NativeLogTool.logError(SdlTrace.SYSTEM_LOG_TAG, "Failure writing XML trace message: " + ex.toString());
- return false;
- }
- return true;
- }
-
-
-
-
- private static String getSmartDeviceLinkTraceRoot(String dumpReason, int seqNo) {
- StringBuilder write = new StringBuilder("<SmartDeviceLinktraceroot>" + "<sequencenum>" + seqNo
- + "</sequencenum>" + "<dumpreason>" + dumpReason
- + "</dumpreason><tracelevel>");
-
- write.append("<tran>" + DiagLevel.getLevel(Mod.tran) + "</tran>");
- write.append("<proto>" + DiagLevel.getLevel(Mod.proto) + "</proto>");
- write.append("<mar>" + DiagLevel.getLevel(Mod.mar) + "</mar>");
- write.append("<rpc>" + DiagLevel.getLevel(Mod.rpc) + "</rpc>");
- write.append("<proxy>" + DiagLevel.getLevel(Mod.proxy) + "</proxy>");
- write.append("<app>" + DiagLevel.getLevel(Mod.app) + "</app>");
-
- write.append("</tracelevel>");
- write.append("</SmartDeviceLinktraceroot>");
- return write.toString();
- } // end-method
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.trace;
+
+import com.smartdevicelink.protocol.SdlPacket;
+import com.smartdevicelink.protocol.enums.FrameDataControlFrameType;
+import com.smartdevicelink.protocol.enums.FrameType;
+import com.smartdevicelink.protocol.enums.SessionType;
+import com.smartdevicelink.proxy.RPCMessage;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.trace.enums.DetailLevel;
+import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
+import com.smartdevicelink.trace.enums.Mod;
+import com.smartdevicelink.transport.SiphonServer;
+import com.smartdevicelink.util.BitConverter;
+import com.smartdevicelink.util.DebugTool;
+import com.smartdevicelink.util.NativeLogTool;
+
+/* This class handles the global TraceSettings as requested by the users either through the combination of the following
+ 1. System defaults
+ 2. Application XML config
+ 3. Programmatic requests from application itself
+
+ It is manifested in the <SmartDeviceLink>...</SmartDeviceLink> tags
+ */
+
+class SdlTraceBase {
+ private static final String SDL_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
+
+ public static final String SYSTEM_LOG_TAG = "SdlTrace";
+
+ private static long baseTics = java.lang.System.currentTimeMillis();
+ private static boolean acceptAPITraceAdjustments = true;
+
+ protected static ISTListener m_appTraceListener = null;
+
+ ///
+ /// The PUBLIC interface to SdlTrace starts here
+ ///
+
+ public static void setAcceptAPITraceAdjustments(Boolean APITraceAdjustmentsAccepted) {
+ if (APITraceAdjustmentsAccepted != null) {
+ acceptAPITraceAdjustments = APITraceAdjustmentsAccepted;
+ }
+ }
+
+ public static boolean getAcceptAPITraceAdjustments() {
+ return acceptAPITraceAdjustments;
+ }
+
+ public static void setAppTraceListener(ISTListener listener) {
+ m_appTraceListener = listener;
+ } // end-method
+
+ public static void setAppTraceLevel(DetailLevel dt) {
+ if ( dt != null && acceptAPITraceAdjustments)
+ DiagLevel.setLevel(Mod.app, dt);
+ } // end-method
+
+ public static void setProxyTraceLevel(DetailLevel dt) {
+ if (dt != null && acceptAPITraceAdjustments)
+ DiagLevel.setLevel(Mod.proxy, dt);
+ } // end-method
+
+ public static void setRpcTraceLevel(DetailLevel dt) {
+ if (dt != null && acceptAPITraceAdjustments)
+ DiagLevel.setLevel(Mod.rpc, dt);
+ } // end-method
+
+ public static void setMarshallingTraceLevel(DetailLevel dt) {
+ if (dt != null && acceptAPITraceAdjustments)
+ DiagLevel.setLevel(Mod.mar, dt);
+ } // end-method
+
+ public static void setProtocolTraceLevel(DetailLevel dt) {
+ if (dt != null && acceptAPITraceAdjustments)
+ DiagLevel.setLevel(Mod.proto, dt);
+ } // end-method
+
+ public static void setTransportTraceLevel(DetailLevel dt) {
+ if (dt != null && acceptAPITraceAdjustments)
+ DiagLevel.setLevel(Mod.tran, dt);
+ } // end-method
+
+ private static String getPid() {
+ return "UNKNOWN";
+ }
+
+ private static String encodeTraceMessage(long timestamp, Mod module, InterfaceActivityDirection msgDirection, String msgBodyXml) {
+ StringBuilder sb = new StringBuilder("<msg><dms>");
+ sb.append(timestamp);
+ sb.append("</dms><pid>");
+ sb.append(getPid());
+ sb.append("</pid><tid>");
+ sb.append(Thread.currentThread().getId());
+ sb.append("</tid><mod>");
+ sb.append(module.toString());
+ sb.append("</mod>");
+ if (msgDirection != InterfaceActivityDirection.None) {
+ sb.append("<dir>");
+ sb.append(interfaceActivityDirectionToString(msgDirection));
+ sb.append("</dir>");
+ } // end-if
+ sb.append(msgBodyXml);
+ sb.append("</msg>");
+
+ return sb.toString();
+ } // end-method
+
+ private static String interfaceActivityDirectionToString(InterfaceActivityDirection iaDirection) {
+ String str = "";
+ switch (iaDirection) {
+ case Receive:
+ str = "rx";
+ break;
+ case Transmit:
+ str = "tx";
+ break;
+ default:
+ break;
+ } // end-switch
+ return str;
+ } // end-method
+
+ static String B64EncodeForXML(String data) {
+ return Mime.base64Encode(data);
+ // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: return Base64.encodeToString(data.getBytes(), Base64.DEFAULT);
+ } // end-method
+
+ public static boolean logProxyEvent(String eventText, String token) {
+ if (DiagLevel.getLevel(Mod.proxy) == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
+ return false;
+ }
+
+ String msg = SdlTrace.B64EncodeForXML(eventText);
+ String xml = SdlTraceBase.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proxy, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
+ return writeXmlTraceMessage(xml);
+ }
+
+ public static boolean logAppEvent(String eventText) {
+ if (DiagLevel.getLevel(Mod.app) == DetailLevel.OFF) {
+ return false;
+ }
+
+ long timestamp = SdlTrace.getBaseTicsDelta();
+ String msg = SdlTrace.B64EncodeForXML(eventText);
+ String xml = SdlTraceBase.encodeTraceMessage(timestamp, Mod.app, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
+ return writeXmlTraceMessage(xml);
+ }
+
+ public static boolean logRPCEvent(InterfaceActivityDirection msgDirection, RPCMessage rpcMsg, String token) {
+ DetailLevel dl = DiagLevel.getLevel(Mod.rpc);
+ if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
+ return false;
+ }
+
+ long timestamp = SdlTrace.getBaseTicsDelta();
+ String xml = SdlTraceBase.encodeTraceMessage(timestamp, Mod.rpc, msgDirection, rpc2Xml(dl, rpcMsg));
+ return writeXmlTraceMessage(xml);
+ }
+
+ private static String rpc2Xml(DetailLevel dl, RPCMessage rpcMsg) {
+ StringBuilder rpcAsXml = new StringBuilder();
+ rpcAsXml.append("<op>");
+ rpcAsXml.append(rpcMsg.getFunctionName());
+ rpcAsXml.append("</op>");
+ boolean hasCorrelationID = false;
+ Integer correlationID = -1;
+ if (rpcMsg instanceof RPCRequest) {
+ hasCorrelationID = true;
+ correlationID = ((RPCRequest)rpcMsg).getCorrelationID();
+ } else if (rpcMsg instanceof RPCResponse) {
+ hasCorrelationID = true;
+ correlationID = ((RPCResponse)rpcMsg).getCorrelationID();
+ } // end-if
+ if (hasCorrelationID) {
+ rpcAsXml.append("<cid>");
+ rpcAsXml.append(correlationID);
+ rpcAsXml.append("</cid>");
+ } // end-if
+ rpcAsXml.append("<type>");
+ rpcAsXml.append(rpcMsg.getMessageType());
+ rpcAsXml.append("</type>");
+ //rpcAsXml.append(newline);
+
+ if (dl == DetailLevel.VERBOSE) {
+ OpenRPCMessage orpcmsg = new OpenRPCMessage(rpcMsg);
+ String rpcParamList = orpcmsg.msgDump();
+ String msg = SdlTrace.B64EncodeForXML(rpcParamList);
+ rpcAsXml.append("<d>");
+ rpcAsXml.append(msg);
+ rpcAsXml.append("</d>");
+ } // end-if
+ return rpcAsXml.toString();
+ } // end-method
+
+ public static boolean logMarshallingEvent(InterfaceActivityDirection msgDirection, byte[] marshalledMessage, String token) {
+ DetailLevel dl = DiagLevel.getLevel(Mod.mar);
+ if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
+ return false;
+ }
+
+ long timestamp = SdlTrace.getBaseTicsDelta();
+ StringBuilder msg = new StringBuilder();
+ msg.append("<sz>");
+ msg.append(marshalledMessage.length);
+ msg.append("</sz>");
+ if (dl == DetailLevel.VERBOSE) {
+ msg.append("<d>");
+ msg.append(Mime.base64Encode(marshalledMessage));
+ // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: msg.append(Base64.encodeToString(marshalledMessage, Base64.DEFAULT));
+ msg.append("</d>");
+ }
+ String xml = SdlTraceBase.encodeTraceMessage(timestamp, Mod.mar, msgDirection, msg.toString());
+ return writeXmlTraceMessage(xml);
+ }
+
+ public static boolean logProtocolEvent(InterfaceActivityDirection frameDirection, SdlPacket packet, int frameDataOffset, int frameDataLength, String token) {
+ DetailLevel dl = DiagLevel.getLevel(Mod.proto);
+ if (dl == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
+ return false;
+ }
+
+ StringBuffer protoMsg = new StringBuffer();
+ protoMsg.append("<frame>");
+ protoMsg.append(SdlTraceBase.getProtocolFrameHeaderInfo(packet));
+ if (dl == DetailLevel.VERBOSE) {
+ if (packet.getPayload() != null && frameDataLength > 0) {
+ protoMsg.append("<d>");
+ String bytesInfo = "";
+ bytesInfo = Mime.base64Encode(packet.getPayload(), frameDataOffset, frameDataLength);
+ // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: bytesInfo = Base64.encodeToString(frameData, frameDataOffset, frameDataLength, Base64.DEFAULT);
+ protoMsg.append(bytesInfo);
+ protoMsg.append("</d>");
+ }
+ }
+ protoMsg.append("</frame>");
+ String xml = SdlTraceBase.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proto, frameDirection, protoMsg.toString());
+ return writeXmlTraceMessage(xml);
+ }
+
+ private static String getProtocolFrameType(FrameType f) {
+ if (f == FrameType.Control)
+ return "Control";
+ else if (f == FrameType.Consecutive)
+ return "Consecutive";
+ else if (f == FrameType.First)
+ return "First";
+ else if (f == FrameType.Single)
+ return "Single";
+
+ return "Unknown";
+ } // end-method
+
+ private static String getProtocolSessionType(SessionType serviceType) {
+ String s;
+ if (serviceType == SessionType.RPC )
+ s = "rpc";
+ else if (serviceType == SessionType.BULK_DATA)
+ s = "bulk";
+ else
+ s = "Unknown";
+ return s;
+ } // end-method
+
+ private static String getProtocolFrameHeaderInfo(SdlPacket hdr) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("<hdr>");
+ sb.append("<ver>");
+ sb.append(hdr.getVersion());
+ sb.append("</ver><cmp>");
+ sb.append(hdr.isEncrypted());
+ sb.append("</cmp><ft>");
+ sb.append(getProtocolFrameType(hdr.getFrameType()));
+ sb.append("</ft><st>");
+ sb.append(getProtocolSessionType(SessionType.valueOf((byte)hdr.getServiceType())));
+ sb.append("</st><sid>");
+ sb.append(hdr.getSessionId());
+ sb.append("</sid><sz>");
+ sb.append(hdr.getDataSize());
+ sb.append("</sz>");
+
+ int frameData = hdr.getFrameInfo();
+ if (hdr.getFrameType() == FrameType.Control) {
+ sb.append("<ca>");
+ if (frameData == FrameDataControlFrameType.StartSession.getValue())
+ sb.append("StartSession");
+ else if (frameData == FrameDataControlFrameType.StartSessionACK.getValue())
+ sb.append("StartSessionACK");
+ else if (frameData == FrameDataControlFrameType.StartSessionNACK.getValue())
+ sb.append("StartSessionNACK");
+ else if (frameData == FrameDataControlFrameType.EndSession.getValue())
+ sb.append("EndSession");
+ sb.append("</ca>");
+ } else if (hdr.getFrameType() == FrameType.Consecutive ) {
+ sb.append("<fsn>");
+ if (frameData == 0 )
+ sb.append("lastFrame");
+ else
+ sb.append(String.format("%02X",frameData));
+ sb.append("</fsn>");
+ } else if (hdr.getFrameType() == FrameType.First ) {
+ int totalSize = BitConverter.intFromByteArray(hdr.getPayload(), 0);
+ int numFrames = BitConverter.intFromByteArray(hdr.getPayload(), 4);
+ sb.append("<total>").append(totalSize).append("</total><numframes>").append(numFrames).append("</numframes>");
+ } else if (hdr.getFrameType() == FrameType.Single ) {
+ sb.append("<single/>");
+ }
+
+ sb.append("</hdr>");
+
+ return sb.toString();
+ } // end-method
+
+ public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int byteLength, String token) {
+ return logTransportEvent(preamble, transportSpecificInfoXml, msgDirection, buf, 0, byteLength, token);
+ }
+
+ private static void checkB64(String x, byte[] buf, int offset, int byteLength) {
+ if ((x.length() % 4) != 0) {
+ NativeLogTool.logWarning(SdlTrace.SYSTEM_LOG_TAG, "b64 string length (" + x.length() + ") isn't multiple of 4: buf.length=" + buf.length + ", offset=" + offset + ", len=" + byteLength);
+ } // end-if
+ } // end-method
+
+ public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int offset, int byteLength, String token) {
+ if (DiagLevel.getLevel(Mod.tran) == DetailLevel.OFF || !token.equals(SDL_LIB_TRACE_KEY)) {
+ return false;
+ }
+
+ StringBuilder msg = new StringBuilder();
+ if (transportSpecificInfoXml != null && transportSpecificInfoXml.length() > 0) {
+ msg.append(transportSpecificInfoXml);
+ }
+ if (preamble != null && preamble.length() > 0) {
+ msg.append("<desc>");
+ msg.append(preamble);
+ msg.append("</desc>");
+ }
+ if (buf != null) {
+ msg.append("<sz>");
+ msg.append(byteLength);
+ msg.append("</sz>");
+ DetailLevel dl = DiagLevel.getLevel(Mod.tran);
+ if (dl == DetailLevel.VERBOSE) {
+ if (buf != null && byteLength > 0) {
+ msg.append("<d>");
+ String bytesInfo = Mime.base64Encode(buf, offset, byteLength);
+ checkB64(bytesInfo, buf, offset, byteLength);
+ msg.append(bytesInfo);
+ msg.append("</d>");
+ }
+ }
+ }
+ String xml = SdlTraceBase.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.tran, msgDirection, msg.toString());
+ return writeXmlTraceMessage(xml);
+ }
+
+ // Package-scoped
+ static long getBaseTicsDelta() {
+ return java.lang.System.currentTimeMillis() - getBaseTics();
+ }
+
+ // Package-scoped
+ static long getBaseTics() {
+ return baseTics;
+ } // end-method
+
+ public static Boolean writeMessageToSiphonServer(String info) {
+ return SiphonServer.sendFormattedTraceMessage(info);
+ }
+
+ private static boolean writeXmlTraceMessage(String msg) {
+ try {
+ // Attempt to write formatted message to the Siphon
+ if (false == writeMessageToSiphonServer(msg)) {
+ // If writing to the Siphon fails, write to the native log
+ NativeLogTool.logInfo(SdlTrace.SYSTEM_LOG_TAG, msg);
+ return false;
+ }
+
+ ISTListener localTraceListener = m_appTraceListener;
+
+ if (localTraceListener != null) {
+ try {
+ localTraceListener.logXmlMsg(msg, SDL_LIB_TRACE_KEY);
+ } catch (Exception ex) {
+ DebugTool.logError(SYSTEM_LOG_TAG, "Failure calling ISTListener: " + ex.toString(), ex);
+ return false;
+ }
+ }
+ } catch (Exception ex) {
+ NativeLogTool.logError(SdlTrace.SYSTEM_LOG_TAG, "Failure writing XML trace message: " + ex.toString());
+ return false;
+ }
+ return true;
+ }
+
+ static String getSmartDeviceLinkTraceRoot(String dumpReason, int seqNo) {
+ StringBuilder write = new StringBuilder("<SmartDeviceLinktraceroot>" + "<sequencenum>" + seqNo
+ + "</sequencenum>" + "<dumpreason>" + dumpReason
+ + "</dumpreason><tracelevel>");
+
+ write.append("<tran>").append(DiagLevel.getLevel(Mod.tran)).append("</tran>");
+ write.append("<proto>").append(DiagLevel.getLevel(Mod.proto)).append("</proto>");
+ write.append("<mar>").append(DiagLevel.getLevel(Mod.mar)).append("</mar>");
+ write.append("<rpc>").append(DiagLevel.getLevel(Mod.rpc)).append("</rpc>");
+ write.append("<proxy>").append(DiagLevel.getLevel(Mod.proxy)).append("</proxy>");
+ write.append("<app>").append(DiagLevel.getLevel(Mod.app)).append("</app>");
+
+ write.append("</tracelevel>");
+ write.append("</SmartDeviceLinktraceroot>");
+ return write.toString();
+ } // end-method
} // end-class \ No newline at end of file
diff --git a/baseAndroid/README.md b/baseAndroid/README.md
deleted file mode 100644
index 4a143e5f9..000000000
--- a/baseAndroid/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-## SmartDeviceLink BaseAndroid
-
-The Base Android folder symbolically links files used by the Android project that are in the Base folder.
-
-This folder does not need to be imported. Please refer to the installation instructions in the Android, JavaSE, or JavaEE README's.
-
-### Windows
-
-The original symbolic links were created for a Unix based operating system. If compiling with Windows the symbolic links will have to be created before compiling the SDL Android project. There is a gradle task added to the `build.gradle` file in the `sdl_android` project that contains a task called `buildWindowSymLinks`. Please note, this task and the supplied script require admin privileges and python to be installed to run. After running this task, Android Studio will recognize the new folder path as the `build.gradle` file contains the necessary conditional that will pick the correct source set to use.
-
-If you are not building the project with the supplied gradle files, you will need to point to the correct path based on the operating system in which you are building the project. \ No newline at end of file
diff --git a/baseAndroid/make_symbolic_links.py b/baseAndroid/make_symbolic_links.py
deleted file mode 100644
index 4be7cdeea..000000000
--- a/baseAndroid/make_symbolic_links.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import os
-import pathlib
-from pathlib import Path
-import re
-
-
-def has_admin():
- if os.name == 'nt':
- try:
- # only windows users with admin privileges can read the C:\windows\temp
- temp = os.listdir(os.sep.join([os.environ.get('SystemRoot', 'C:\\windows'), 'temp']))
- except:
- return os.environ['USERNAME'],False
- else:
- return os.environ['USERNAME'],True
- else:
- if 'SUDO_USER' in os.environ and os.geteuid() == 0:
- return os.environ['SUDO_USER'],True
- else:
- return os.environ['USERNAME'],False
-
-
-print('Script Start')
-
-isAdmin = has_admin()
-print('Running As Admin - ', isAdmin[1])
-if not isAdmin[1]:
- print('Can\'t run without admin privileges')
- exit()
-
-pathlist = Path('src/').glob('**/*')
-# Delete the old directory
-os.system('echo y | rmdir windows /s')
-
-for path in pathlist:
- path_in_str = str(path)
- if os.path.isfile(path):
- # check if it's a link to a file or folder
- source_link_str = path_in_str
- source_link_str = '..\\base\\' + source_link_str
- # Remove the root folder for the actual link
- print(source_link_str)
-
- testDest = 'windows\\' + path_in_str
-
- directory = pathlib.Path(testDest).parent
- print(str(directory))
- prefixDir = (re.sub(r"\\+[^\\]*", r"\\..", str(directory))+'\\..\\')[8:] # 8 to remove windows/
- # Change all the directory paths into .. so that it will properly move up a folder.
-
- os.system('mkdir %s' % directory)
- os.system('icacls %s /grant Everyone:(f)' % directory)
-
- # Now we need to go through each destination directory and understand that's how many ../ we have to add
- if path_in_str.endswith('.java'):
- print('Java file link found')
-
- command = 'mklink "%s" "%s%s"' % (testDest, prefixDir, source_link_str)
- print('Performing command %s' % command)
- os.system(command)
- else:
- print('Directory link found')
- command = 'mklink /D "%s" "%s%s"' % (testDest, prefixDir, source_link_str)
- print('Performing command %s' % command)
- os.system(command)
-
-print('Script Ends')
-
-
diff --git a/baseAndroid/make_symlinks.lnk b/baseAndroid/make_symlinks.lnk
deleted file mode 100644
index 86e9d3e41..000000000
--- a/baseAndroid/make_symlinks.lnk
+++ /dev/null
Binary files differ
diff --git a/baseAndroid/run_as_admin_symlink_script.bat b/baseAndroid/run_as_admin_symlink_script.bat
deleted file mode 100644
index 439d7709f..000000000
--- a/baseAndroid/run_as_admin_symlink_script.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-pushd %~dp0
-python make_symbolic_links.py
-popd
-pause \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/Dispatcher b/baseAndroid/src/main/java/com/smartdevicelink/Dispatcher
deleted file mode 120000
index 2af882be4..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/Dispatcher
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../base/src/main/java/com/smartdevicelink/Dispatcher/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/BaseSdlSession.java b/baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/BaseSdlSession.java
deleted file mode 120000
index 0bc868029..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/BaseSdlSession.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/SdlConnection/BaseSdlSession.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/ISdlSessionListener.java b/baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/ISdlSessionListener.java
deleted file mode 120000
index 2c9daabfa..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/SdlConnection/ISdlSessionListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/SdlConnection/ISdlSessionListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/exception b/baseAndroid/src/main/java/com/smartdevicelink/exception
deleted file mode 120000
index d5d048354..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/exception
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../base/src/main/java/com/smartdevicelink/exception/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java b/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java
deleted file mode 120000
index bf45a3bf6..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManagerListener.java b/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManagerListener.java
deleted file mode 120000
index 568044bfd..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSdlManagerListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/BaseSdlManagerListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSubManager.java b/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSubManager.java
deleted file mode 120000
index f1f35fe92..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/BaseSubManager.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/BaseSubManager.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/CompletionListener.java b/baseAndroid/src/main/java/com/smartdevicelink/managers/CompletionListener.java
deleted file mode 120000
index 1bd4fd70e..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/CompletionListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/CompletionListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/ManagerUtility.java b/baseAndroid/src/main/java/com/smartdevicelink/managers/ManagerUtility.java
deleted file mode 120000
index 55d1ecb8b..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/ManagerUtility.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/ManagerUtility.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/ServiceEncryptionListener.java b/baseAndroid/src/main/java/com/smartdevicelink/managers/ServiceEncryptionListener.java
deleted file mode 120000
index f35552f46..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/ServiceEncryptionListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/ServiceEncryptionListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/StreamingStateMachine.java b/baseAndroid/src/main/java/com/smartdevicelink/managers/StreamingStateMachine.java
deleted file mode 120000
index 2d817807f..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/StreamingStateMachine.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/StreamingStateMachine.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/audio b/baseAndroid/src/main/java/com/smartdevicelink/managers/audio
deleted file mode 120000
index 7d71d50ed..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/audio
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/audio/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/file b/baseAndroid/src/main/java/com/smartdevicelink/managers/file
deleted file mode 120000
index 177a5823e..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/file
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/file \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/lifecycle b/baseAndroid/src/main/java/com/smartdevicelink/managers/lifecycle
deleted file mode 120000
index d72cada51..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/lifecycle
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/lifecycle/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/permission b/baseAndroid/src/main/java/com/smartdevicelink/managers/permission
deleted file mode 120000
index d18186971..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/permission
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/permission \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/screen b/baseAndroid/src/main/java/com/smartdevicelink/managers/screen
deleted file mode 120000
index fbf226f8e..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/screen
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/screen \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/managers/video b/baseAndroid/src/main/java/com/smartdevicelink/managers/video
deleted file mode 120000
index de58416c9..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/managers/video
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/managers/video/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/marshal b/baseAndroid/src/main/java/com/smartdevicelink/marshal
deleted file mode 120000
index c86064e2f..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/marshal
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../base/src/main/java/com/smartdevicelink/marshal/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/BaseSdlPacket.java b/baseAndroid/src/main/java/com/smartdevicelink/protocol/BaseSdlPacket.java
deleted file mode 120000
index 2fec10c84..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/BaseSdlPacket.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/BaseSdlPacket.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/BinaryFrameHeader.java b/baseAndroid/src/main/java/com/smartdevicelink/protocol/BinaryFrameHeader.java
deleted file mode 120000
index c2b9f5a5d..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/BinaryFrameHeader.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/BinaryFrameHeader.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/ISdlProtocol.java b/baseAndroid/src/main/java/com/smartdevicelink/protocol/ISdlProtocol.java
deleted file mode 120000
index 37bba1630..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/ISdlProtocol.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/ISdlProtocol.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/ISecondaryTransportListener.java b/baseAndroid/src/main/java/com/smartdevicelink/protocol/ISecondaryTransportListener.java
deleted file mode 120000
index 92bbe53bf..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/ISecondaryTransportListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/ISecondaryTransportListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/ProtocolMessage.java b/baseAndroid/src/main/java/com/smartdevicelink/protocol/ProtocolMessage.java
deleted file mode 120000
index 530ee50b1..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/ProtocolMessage.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/ProtocolMessage.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlPacketFactory.java b/baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlPacketFactory.java
deleted file mode 120000
index aded79f74..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlPacketFactory.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/SdlPacketFactory.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlProtocolBase.java b/baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlProtocolBase.java
deleted file mode 120000
index 12d9192e9..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/SdlProtocolBase.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/SdlProtocolBase.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/protocol/enums b/baseAndroid/src/main/java/com/smartdevicelink/protocol/enums
deleted file mode 120000
index e4adb738b..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/protocol/enums
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/protocol/enums \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/IProxyListener.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/IProxyListener.java
deleted file mode 120000
index e79a51ef6..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/IProxyListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/IProxyListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCMessage.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCMessage.java
deleted file mode 120000
index 97e44408d..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCMessage.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/RPCMessage.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCNotification.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCNotification.java
deleted file mode 120000
index 8713d52e3..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCNotification.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/RPCNotification.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCRequest.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCRequest.java
deleted file mode 120000
index c1e2f4a27..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCRequest.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/RPCRequest.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCResponse.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCResponse.java
deleted file mode 120000
index afcfd9e15..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCResponse.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/RPCResponse.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCStruct.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCStruct.java
deleted file mode 120000
index 683ec16a9..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/RPCStruct.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/RPCStruct.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java
deleted file mode 120000
index ba944a202..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/callbacks b/baseAndroid/src/main/java/com/smartdevicelink/proxy/callbacks
deleted file mode 120000
index 74653ae9f..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/callbacks
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/callbacks/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/constants b/baseAndroid/src/main/java/com/smartdevicelink/proxy/constants
deleted file mode 120000
index ced1d41aa..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/constants
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/constants/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IAudioStreamListener.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IAudioStreamListener.java
deleted file mode 120000
index 02570d2f8..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IAudioStreamListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/proxy/interfaces/IAudioStreamListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java
deleted file mode 120000
index cede25df1..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
deleted file mode 120000
index 32895d7fe..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java
deleted file mode 120000
index 41112b9e7..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java
deleted file mode 120000
index 9b79b4afc..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdlServiceListener.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdlServiceListener.java
deleted file mode 120000
index 87f717597..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/ISdlServiceListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdlServiceListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IVideoStreamListener.java b/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IVideoStreamListener.java
deleted file mode 120000
index c817900a3..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/interfaces/IVideoStreamListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/proxy/interfaces/IVideoStreamListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/proxy/rpc b/baseAndroid/src/main/java/com/smartdevicelink/proxy/rpc
deleted file mode 120000
index 7f7d97664..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/proxy/rpc
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/proxy/rpc \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/security b/baseAndroid/src/main/java/com/smartdevicelink/security
deleted file mode 120000
index 09e7051a4..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/security
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../base/src/main/java/com/smartdevicelink/security \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/streaming/AbstractPacketizer.java b/baseAndroid/src/main/java/com/smartdevicelink/streaming/AbstractPacketizer.java
deleted file mode 120000
index ce7fd47d9..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/streaming/AbstractPacketizer.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/streaming/AbstractPacketizer.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/streaming/IStreamListener.java b/baseAndroid/src/main/java/com/smartdevicelink/streaming/IStreamListener.java
deleted file mode 120000
index f703ac149..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/streaming/IStreamListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/streaming/IStreamListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/streaming/audio b/baseAndroid/src/main/java/com/smartdevicelink/streaming/audio
deleted file mode 120000
index b91099bd1..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/streaming/audio
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/streaming/audio/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/streaming/video/RTPH264Packetizer.java b/baseAndroid/src/main/java/com/smartdevicelink/streaming/video/RTPH264Packetizer.java
deleted file mode 120000
index 1eec0a104..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/streaming/video/RTPH264Packetizer.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/streaming/video/RTPH264Packetizer.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java b/baseAndroid/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java
deleted file mode 120000
index 8b18e72b2..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/streaming/video/VideoStreamingParameters.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/trace/DiagLevel.java b/baseAndroid/src/main/java/com/smartdevicelink/trace/DiagLevel.java
deleted file mode 120000
index 1bc9b65d1..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/trace/DiagLevel.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/trace/DiagLevel.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/trace/ISTListener.java b/baseAndroid/src/main/java/com/smartdevicelink/trace/ISTListener.java
deleted file mode 120000
index 2ac262989..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/trace/ISTListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/trace/ISTListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/trace/Mime.java b/baseAndroid/src/main/java/com/smartdevicelink/trace/Mime.java
deleted file mode 120000
index 8dc93a328..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/trace/Mime.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/trace/Mime.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/trace/OpenRPCMessage.java b/baseAndroid/src/main/java/com/smartdevicelink/trace/OpenRPCMessage.java
deleted file mode 120000
index 8d7260eb5..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/trace/OpenRPCMessage.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/trace/OpenRPCMessage.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/trace/enums b/baseAndroid/src/main/java/com/smartdevicelink/trace/enums
deleted file mode 120000
index 6c0343907..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/trace/enums
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/trace/enums/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/BaseTransportConfig.java b/baseAndroid/src/main/java/com/smartdevicelink/transport/BaseTransportConfig.java
deleted file mode 120000
index 92effaf36..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/BaseTransportConfig.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/transport/BaseTransportConfig.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/ITransportListener.java b/baseAndroid/src/main/java/com/smartdevicelink/transport/ITransportListener.java
deleted file mode 120000
index 587a7a3de..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/ITransportListener.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/transport/ITransportListener.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/SdlPsm.java b/baseAndroid/src/main/java/com/smartdevicelink/transport/SdlPsm.java
deleted file mode 120000
index 22d69d1cd..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/SdlPsm.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/transport/SdlPsm.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/SiphonServer.java b/baseAndroid/src/main/java/com/smartdevicelink/transport/SiphonServer.java
deleted file mode 120000
index b28f2965d..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/SiphonServer.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/transport/SiphonServer.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/TransportConstants.java b/baseAndroid/src/main/java/com/smartdevicelink/transport/TransportConstants.java
deleted file mode 120000
index 61f953de2..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/TransportConstants.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/transport/TransportConstants.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/TransportManagerBase.java b/baseAndroid/src/main/java/com/smartdevicelink/transport/TransportManagerBase.java
deleted file mode 120000
index f89613939..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/TransportManagerBase.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/transport/TransportManagerBase.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/enums b/baseAndroid/src/main/java/com/smartdevicelink/transport/enums
deleted file mode 120000
index c5b0467f6..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/enums
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/transport/enums/ \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/transport/utl/BaseTransportRecord.java b/baseAndroid/src/main/java/com/smartdevicelink/transport/utl/BaseTransportRecord.java
deleted file mode 120000
index 067c6a17a..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/transport/utl/BaseTransportRecord.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../base/src/main/java/com/smartdevicelink/transport/utl/BaseTransportRecord.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/BitConverter.java b/baseAndroid/src/main/java/com/smartdevicelink/util/BitConverter.java
deleted file mode 120000
index ace3985f9..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/BitConverter.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/BitConverter.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/ByteEnumer.java b/baseAndroid/src/main/java/com/smartdevicelink/util/ByteEnumer.java
deleted file mode 120000
index 8cc7d9ac8..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/ByteEnumer.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/ByteEnumer.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/CompareUtils.java b/baseAndroid/src/main/java/com/smartdevicelink/util/CompareUtils.java
deleted file mode 120000
index 9d331ba9c..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/CompareUtils.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/CompareUtils.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/CorrelationIdGenerator.java b/baseAndroid/src/main/java/com/smartdevicelink/util/CorrelationIdGenerator.java
deleted file mode 120000
index 4d9cfea49..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/CorrelationIdGenerator.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/CorrelationIdGenerator.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/DebugTool.java b/baseAndroid/src/main/java/com/smartdevicelink/util/DebugTool.java
deleted file mode 120000
index 2c9f91906..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/DebugTool.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/DebugTool.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/FileUtls.java b/baseAndroid/src/main/java/com/smartdevicelink/util/FileUtls.java
deleted file mode 120000
index 8eb2f22c2..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/FileUtls.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/FileUtls.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/IConsole.java b/baseAndroid/src/main/java/com/smartdevicelink/util/IConsole.java
deleted file mode 120000
index 2cf061029..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/IConsole.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/IConsole.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/NativeLogTool.java b/baseAndroid/src/main/java/com/smartdevicelink/util/NativeLogTool.java
deleted file mode 120000
index 3e1645508..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/NativeLogTool.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/NativeLogTool.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/SdlDataTypeConverter.java b/baseAndroid/src/main/java/com/smartdevicelink/util/SdlDataTypeConverter.java
deleted file mode 120000
index d44a2b6e0..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/SdlDataTypeConverter.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/SdlDataTypeConverter.java \ No newline at end of file
diff --git a/baseAndroid/src/main/java/com/smartdevicelink/util/Version.java b/baseAndroid/src/main/java/com/smartdevicelink/util/Version.java
deleted file mode 120000
index e21ea0440..000000000
--- a/baseAndroid/src/main/java/com/smartdevicelink/util/Version.java
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../base/src/main/java/com/smartdevicelink/util/Version.java \ No newline at end of file
diff --git a/base/src/main/java/android/os/AsyncTask.java b/javaSE/src/main/java/android/os/AsyncTask.java
index db6b69a8e..db6b69a8e 100644
--- a/base/src/main/java/android/os/AsyncTask.java
+++ b/javaSE/src/main/java/android/os/AsyncTask.java
diff --git a/base/src/main/java/android/os/Parcel.java b/javaSE/src/main/java/android/os/Parcel.java
index b99dbc671..b99dbc671 100644
--- a/base/src/main/java/android/os/Parcel.java
+++ b/javaSE/src/main/java/android/os/Parcel.java
diff --git a/base/src/main/java/android/os/Parcelable.java b/javaSE/src/main/java/android/os/Parcelable.java
index e09a1754c..e09a1754c 100644
--- a/base/src/main/java/android/os/Parcelable.java
+++ b/javaSE/src/main/java/android/os/Parcelable.java
diff --git a/base/src/main/java/android/util/Log.java b/javaSE/src/main/java/android/util/Log.java
index 7374ff04c..7374ff04c 100644
--- a/base/src/main/java/android/util/Log.java
+++ b/javaSE/src/main/java/android/util/Log.java
diff --git a/base/src/main/java/com/livio/BSON/BsonEncoder.java b/javaSE/src/main/java/com/livio/BSON/BsonEncoder.java
index 22c47f6cb..22c47f6cb 100644
--- a/base/src/main/java/com/livio/BSON/BsonEncoder.java
+++ b/javaSE/src/main/java/com/livio/BSON/BsonEncoder.java
diff --git a/base/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java b/javaSE/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java
index 67ea25cc1..67ea25cc1 100644
--- a/base/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java
+++ b/javaSE/src/main/java/com/smartdevicelink/protocol/SdlProtocol.java
diff --git a/javaSE/src/main/java/com/smartdevicelink/trace/SdlTrace.java b/javaSE/src/main/java/com/smartdevicelink/trace/SdlTrace.java
new file mode 100644
index 000000000..482b4a846
--- /dev/null
+++ b/javaSE/src/main/java/com/smartdevicelink/trace/SdlTrace.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.trace;
+
+
+/* This class handles the global TraceSettings as requested by the users either through the combination of the following
+ 1. System defaults
+ 2. Application XML config
+ 3. Programmatic requests from application itself
+
+ It is manifested in the <SmartDeviceLink>...</SmartDeviceLink> tags
+ */
+
+public class SdlTrace extends SdlTraceBase{
+ private static String getPid(){
+ //Default implementation is not able to get this information
+ return "UNKNOWN";
+ }
+} // end-class \ No newline at end of file
diff --git a/base/src/main/java/com/smartdevicelink/transport/CustomTransport.java b/javaSE/src/main/java/com/smartdevicelink/transport/CustomTransport.java
index ad02f96d2..ad02f96d2 100644
--- a/base/src/main/java/com/smartdevicelink/transport/CustomTransport.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/CustomTransport.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java b/javaSE/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java
index af0613aa1..af0613aa1 100644
--- a/base/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/TransportCallback.java b/javaSE/src/main/java/com/smartdevicelink/transport/TransportCallback.java
index 551ed9d29..551ed9d29 100644
--- a/base/src/main/java/com/smartdevicelink/transport/TransportCallback.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/TransportCallback.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/TransportInterface.java b/javaSE/src/main/java/com/smartdevicelink/transport/TransportInterface.java
index 989b2df33..989b2df33 100644
--- a/base/src/main/java/com/smartdevicelink/transport/TransportInterface.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/TransportInterface.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/TransportManager.java b/javaSE/src/main/java/com/smartdevicelink/transport/TransportManager.java
index c8a07a1cc..c8a07a1cc 100644
--- a/base/src/main/java/com/smartdevicelink/transport/TransportManager.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/TransportManager.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/WebSocketServer.java b/javaSE/src/main/java/com/smartdevicelink/transport/WebSocketServer.java
index 8f5411ce0..8f5411ce0 100644
--- a/base/src/main/java/com/smartdevicelink/transport/WebSocketServer.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/WebSocketServer.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/WebSocketServerConfig.java b/javaSE/src/main/java/com/smartdevicelink/transport/WebSocketServerConfig.java
index 6add5ae71..6add5ae71 100644
--- a/base/src/main/java/com/smartdevicelink/transport/WebSocketServerConfig.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/WebSocketServerConfig.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/utl/SSLConfig.java b/javaSE/src/main/java/com/smartdevicelink/transport/utl/SSLConfig.java
index d46e8aac6..d46e8aac6 100644
--- a/base/src/main/java/com/smartdevicelink/transport/utl/SSLConfig.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/utl/SSLConfig.java
diff --git a/base/src/main/java/com/smartdevicelink/transport/utl/SSLWebSocketFactoryGenerator.java b/javaSE/src/main/java/com/smartdevicelink/transport/utl/SSLWebSocketFactoryGenerator.java
index 95d0ceac2..95d0ceac2 100644
--- a/base/src/main/java/com/smartdevicelink/transport/utl/SSLWebSocketFactoryGenerator.java
+++ b/javaSE/src/main/java/com/smartdevicelink/transport/utl/SSLWebSocketFactoryGenerator.java
diff --git a/base/src/main/java/org/json/JSON.java b/javaSE/src/main/java/org/json/JSON.java
index 1b32e698d..1b32e698d 100644
--- a/base/src/main/java/org/json/JSON.java
+++ b/javaSE/src/main/java/org/json/JSON.java
diff --git a/base/src/main/java/org/json/JSONArray.java b/javaSE/src/main/java/org/json/JSONArray.java
index 996f44909..996f44909 100644
--- a/base/src/main/java/org/json/JSONArray.java
+++ b/javaSE/src/main/java/org/json/JSONArray.java
diff --git a/base/src/main/java/org/json/JSONException.java b/javaSE/src/main/java/org/json/JSONException.java
index 05e1dddc9..05e1dddc9 100644
--- a/base/src/main/java/org/json/JSONException.java
+++ b/javaSE/src/main/java/org/json/JSONException.java
diff --git a/base/src/main/java/org/json/JSONObject.java b/javaSE/src/main/java/org/json/JSONObject.java
index 74ea973c2..74ea973c2 100644
--- a/base/src/main/java/org/json/JSONObject.java
+++ b/javaSE/src/main/java/org/json/JSONObject.java
diff --git a/base/src/main/java/org/json/JSONStringer.java b/javaSE/src/main/java/org/json/JSONStringer.java
index dd3b2a7d8..dd3b2a7d8 100644
--- a/base/src/main/java/org/json/JSONStringer.java
+++ b/javaSE/src/main/java/org/json/JSONStringer.java
diff --git a/base/src/main/java/org/json/JSONTokener.java b/javaSE/src/main/java/org/json/JSONTokener.java
index 4bdd9ad37..4bdd9ad37 100644
--- a/base/src/main/java/org/json/JSONTokener.java
+++ b/javaSE/src/main/java/org/json/JSONTokener.java