diff options
author | Bilal Alsharifi <599206+bilal-alsharifi@users.noreply.github.com> | 2020-09-09 10:51:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 10:51:41 -0400 |
commit | aefca54cd5adfcfd4b74fd899d4df56f3e3b31e5 (patch) | |
tree | ee41f34d21688b34e3afa107885c525d72c1bb52 /android/sdl_android/src | |
parent | f018442fd4b70608898dc908e493b1f9eab26274 (diff) | |
parent | a6c574781c7c721607c93faeae5c8b81c45b0fce (diff) | |
download | sdl_android-aefca54cd5adfcfd4b74fd899d4df56f3e3b31e5.tar.gz |
Merge pull request #1487 from smartdevicelink/remove-deprecated-transport-apis
Remove deprecated transport apis
Diffstat (limited to 'android/sdl_android/src')
8 files changed, 208 insertions, 269 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java index 88dfeb1c6..092f7031b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java @@ -362,7 +362,7 @@ public class RPCGenericTests { } stream.close(); } catch (IOException | XmlPullParserException e) { - fail("Cannot parse mobile APIs XML file: " + e.getMessage()); + fail("Cannot parse mobile APIs XML file. Please make sure that the RPC Spec submodule is initialized: " + e.getMessage()); } return rpcParamsMap; } diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java index 075f89a81..d1a359e24 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java @@ -1,5 +1,6 @@ package com.smartdevicelink.transport; +import android.content.ComponentName; import android.os.Bundle; import android.os.Handler; import android.os.Looper; @@ -25,7 +26,12 @@ public class MultiplexTransportTest { public void setUp() throws Exception { rsvp = new RouterServiceValidator(getInstrumentation().getTargetContext()); rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_NONE); - rsvp.validate(); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + + } + }); } diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/RSVTestCase.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/RSVTestCase.java index 557e0592d..69a8caeea 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/RSVTestCase.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/RSVTestCase.java @@ -86,7 +86,12 @@ public class RSVTestCase { public void testInstalledFrom(){ if(liveTest){ rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_INSTALLED_FROM_CHECK); - assertTrue(rsvp.validate()); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertTrue(valid); + } + }); } } @@ -94,7 +99,12 @@ public class RSVTestCase { public void testPackageCheck(){ if(liveTest){ rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_PACKAGE_CHECK); - assertTrue(rsvp.validate()); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertTrue(valid); + } + }); } } @@ -102,7 +112,12 @@ public class RSVTestCase { public void testVersionCheck(){ if(liveTest){ rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_VERSION_CHECK); - assertTrue(rsvp.validate()); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertTrue(valid); + } + }); } } @@ -110,7 +125,12 @@ public class RSVTestCase { public void testNoFlags(){ if(liveTest){ rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_NONE); - assertTrue(rsvp.validate()); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertTrue(valid); + } + }); } } @@ -118,7 +138,12 @@ public class RSVTestCase { public void testAllFlags(){ if(liveTest){ rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_PERFORM_ALL_CHECKS); - assertTrue(rsvp.validate()); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertTrue(valid); + } + }); } } @@ -192,7 +217,12 @@ public class RSVTestCase { public void testNoSecurity(){ requestTListLock(); - RouterServiceValidator rsvp = new RouterServiceValidator(getInstrumentation().getTargetContext()); //Use a locally scoped instance + RouterServiceValidator rsvp = new RouterServiceValidator(getInstrumentation().getTargetContext(), new ComponentName("anything", getInstrumentation().getTargetContext().getClass().getSimpleName())) { + @Override + protected boolean isServiceRunning(Context context, ComponentName service) { + return true; + } + }; rsvp.setSecurityLevel(MultiplexTransportConfig.FLAG_MULTI_SECURITY_OFF); rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_INSTALLED_FROM_CHECK); @@ -203,7 +233,12 @@ public class RSVTestCase { assertFalse(RouterServiceValidator.createTrustedListRequest(getInstrumentation().getTargetContext(), true, null, trustedListCallback)); //This should always return true - assertTrue(rsvp.validate()); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertTrue(valid); + } + }); } @@ -451,12 +486,22 @@ public class RSVTestCase { // Fail, different package name for context and service and app security setting is not OFF and app is not on trusted list RouterServiceValidatorTest rsvpFail = new RouterServiceValidatorTest(getInstrumentation().getTargetContext(), new ComponentName("anything", getInstrumentation().getTargetContext().getClass().getSimpleName())); rsvpFail.setSecurityLevel(MultiplexTransportConfig.FLAG_MULTI_SECURITY_HIGH); - assertFalse(rsvpFail.validate()); + rsvpFail.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertFalse(valid); + } + }); // Success, same package name for context and service RouterServiceValidatorTest rsvpPass = new RouterServiceValidatorTest(getInstrumentation().getTargetContext(), new ComponentName(getInstrumentation().getTargetContext().getPackageName(), getInstrumentation().getTargetContext().getClass().getSimpleName())); rsvpPass.setSecurityLevel(MultiplexTransportConfig.FLAG_MULTI_SECURITY_HIGH); - assertTrue(rsvpPass.validate()); + rsvpPass.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + assertTrue(valid); + } + }); } /** diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java index 22837f77d..aa0507a36 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java @@ -1,6 +1,7 @@ package com.smartdevicelink.transport; import android.bluetooth.BluetoothAdapter; +import android.content.ComponentName; import android.os.Handler; import android.os.Looper; import android.os.Message; @@ -27,7 +28,12 @@ public class TransportBrokerTest { //FIXME this test class needs to be fixed. At @Before public void setUp() throws Exception { rsvp = new RouterServiceValidator(getInstrumentation().getTargetContext()); - rsvp.validate(); + rsvp.validateAsync(new RouterServiceValidator.ValidationStatusCallback() { + @Override + public void onFinishedValidation(boolean valid, ComponentName name) { + + } + }); } diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java index 138b1adb2..449774d57 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java @@ -74,7 +74,6 @@ public class MultiplexBluetoothTransport extends MultiplexBaseTransport{ private ConnectThread mConnectThread; private ConnectedThread mConnectedThread; private ConnectedWriteThread mConnectedWriteThread; - private int mBluetoothLevel = 0; Handler timeOutHandler; Runnable socketRunable; boolean keepSocketAlive = true; @@ -85,8 +84,6 @@ public class MultiplexBluetoothTransport extends MultiplexBaseTransport{ */ public MultiplexBluetoothTransport(Handler handler) { super(handler, TransportType.BLUETOOTH); - //This will keep track of which method worked last night - mBluetoothLevel = SdlRouterService.getBluetoothPrefs(SHARED_PREFS); } //These methods are used so we can have a semi-static reference to the Accept Thread (Static reference inherited by housing class) @@ -480,169 +477,148 @@ public class MultiplexBluetoothTransport extends MultiplexBaseTransport{ boolean success = false; Looper.prepare(); - while(attemptCount < 5) - { + while (attemptCount < 5) { //Looper.loop() - attemptCount++; - try { - // This is a blocking call and will only return on a - // successful connection or an exception - mBluetoothLevel = SdlRouterService.getBluetoothPrefs(SHARED_PREFS); - long waitTime = 3000; - try { - Thread.sleep(waitTime); - } catch (InterruptedException e) { - e.printStackTrace(); - } - //This sequence tries to use reflection first to connect with a certain number of phones that require this - //Next is the most common methods for phones - //Finally if both have failed an insecure connection is attempted, though this is not available on lower SDK's - boolean tryInsecure = false; - boolean trySecure = false; - //Log.i(TAG,mmDevice.getName() + " socket connecting..."); - - if(mBluetoothLevel<=1){ - try { - SdlRouterService.setBluetoothPrefs(2,SHARED_PREFS); - Method m = mmDevice.getClass().getMethod("createRfcommSocket", new Class[] {int.class}); - //Log.i(TAG,"connecting using createRfcommSocket"); - mmSocket = (BluetoothSocket) m.invoke(mmDevice, Integer.valueOf(1)); - if(mmSocket!=null){ - //Looper.prepare(); - timerDelayRemoveDialog(mmSocket); - //Looper.loop(); - mmSocket.connect(); - timeOutHandler.removeCallbacks(socketRunable); - if(Looper.myLooper() != null){ - Looper.myLooper().quit(); - } - success=true; - SdlRouterService.setBluetoothPrefs(1,SHARED_PREFS); - break; - } else{trySecure = true;} - - } catch (Exception e) { - //Log.e(TAG,"createRfcommSocket exception - " + e.toString()); - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - - trySecure = true; - try { - Thread.sleep(500); - } catch (InterruptedException e2) { - e2.printStackTrace(); - } - } - }else{trySecure = true;} - if(trySecure && mBluetoothLevel<=2){ - try { - SdlRouterService.setBluetoothPrefs(3,SHARED_PREFS); - //Log.i(TAG, "connecting using createRfcommSocketToServiceRecord "); - mmSocket = mmDevice.createRfcommSocketToServiceRecord(SERVER_UUID); - if(mmSocket!=null){ - //Looper.prepare(); - timerDelayRemoveDialog(mmSocket); - //Looper.loop(); - mmSocket.connect(); - timeOutHandler.removeCallbacks(socketRunable); - if(Looper.myLooper() != null){ - Looper.myLooper().quit(); - } - success=true; - SdlRouterService.setBluetoothPrefs(2,SHARED_PREFS); - break; - }else{tryInsecure = true;} - } catch (IOException io) { - tryInsecure = true; - DebugTool.logError(TAG, "createRfcommSocketToServiceRecord exception - " + io.toString()); - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); + attemptCount++; + try { + // This is a blocking call and will only return on a + // successful connection or an exception + long waitTime = 3000; + try { + Thread.sleep(waitTime); + } catch (InterruptedException e) { + e.printStackTrace(); + } + //This sequence tries to use reflection first to connect with a certain number of phones that require this + //Next is the most common methods for phones + //Finally if both have failed an insecure connection is attempted, though this is not available on lower SDK's + boolean tryInsecure = false; + boolean trySecure = false; + //Log.i(TAG,mmDevice.getName() + " socket connecting..."); + + try { + Method m = mmDevice.getClass().getMethod("createRfcommSocket", new Class[]{int.class}); + //Log.i(TAG,"connecting using createRfcommSocket"); + mmSocket = (BluetoothSocket) m.invoke(mmDevice, Integer.valueOf(1)); + if (mmSocket != null) { + //Looper.prepare(); + timerDelayRemoveDialog(mmSocket); + //Looper.loop(); + mmSocket.connect(); + timeOutHandler.removeCallbacks(socketRunable); + if (Looper.myLooper() != null) { + Looper.myLooper().quit(); + } + success = true; + break; + } else { + trySecure = true; + } - } catch (Exception e){ + } catch (Exception e) { + //Log.e(TAG,"createRfcommSocket exception - " + e.toString()); + trySecure = true; + try { + Thread.sleep(500); + } catch (InterruptedException e2) { + e2.printStackTrace(); + } + } + if (trySecure) { + try { + //Log.i(TAG, "connecting using createRfcommSocketToServiceRecord "); + mmSocket = mmDevice.createRfcommSocketToServiceRecord(SERVER_UUID); + if (mmSocket != null) { + //Looper.prepare(); + timerDelayRemoveDialog(mmSocket); + //Looper.loop(); + mmSocket.connect(); + timeOutHandler.removeCallbacks(socketRunable); + if (Looper.myLooper() != null) { + Looper.myLooper().quit(); + } + success = true; + break; + } else { + tryInsecure = true; + } + } catch (IOException io) { + tryInsecure = true; + DebugTool.logError(TAG, "createRfcommSocketToServiceRecord exception - " + io.toString()); + } catch (Exception e) { DebugTool.logError(TAG, "createRfcommSocketToServiceRecord exception - " + e.toString()); - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - - } - }else{tryInsecure = true;} - - if (tryInsecure && mBluetoothLevel<=3) { - // try again using insecure comm if available - try { - SdlRouterService.setBluetoothPrefs(4,SHARED_PREFS); - //Log.i(TAG,"connecting using createInsecureRfcommSocketToServiceRecord"); - Method m = mmDevice.getClass().getMethod("createInsecureRfcommSocketToServiceRecord", new Class[] {UUID.class}); - mmSocket = (BluetoothSocket) m.invoke(mmDevice, new Object[] {SERVER_UUID}); - //Looper.prepare(); - timerDelayRemoveDialog(mmSocket); - //Looper.loop(); - mmSocket.connect(); - timeOutHandler.removeCallbacks(socketRunable); - if(Looper.myLooper() != null){ - Looper.myLooper().quit(); - } - success=true; - tryInsecure = false; - SdlRouterService.setBluetoothPrefs(3,SHARED_PREFS); - break; - } catch (NoSuchMethodException ie) { - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - } catch (IllegalAccessException ie) { - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - } catch (InvocationTargetException ie) { - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - } - } - if (tryInsecure && mBluetoothLevel<=4) { - // try again using insecure comm if available - try { - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - //Log.i(TAG,"connecting using createInsecureRfcommSocket()"); - Method m = mmDevice.getClass().getMethod("createInsecureRfcommSocket()", new Class[] {UUID.class}); - mmSocket = (BluetoothSocket) m.invoke(mmDevice, new Object[] {SERVER_UUID}); - //Looper.prepare(); - timerDelayRemoveDialog(mmSocket); - //Looper.loop(); - mmSocket.connect(); - timeOutHandler.removeCallbacks(socketRunable); - if(Looper.myLooper() != null){ - Looper.myLooper().quit(); - } - success=true; - SdlRouterService.setBluetoothPrefs(4,SHARED_PREFS); - break; - } catch (NoSuchMethodException ie) { - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - } catch (IllegalAccessException ie) { - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - } catch (InvocationTargetException ie) { - SdlRouterService.setBluetoothPrefs(0,SHARED_PREFS); - } - } - } catch (IOException e) { - connectionFailed(); - DebugTool.logError(TAG,e.getClass().getSimpleName() - + " caught connecting to the bluetooth socket: " - + e.toString()); - try { - mmSocket.close(); - } catch (IOException e2) { - DebugTool.logError(TAG, "unable to close() socket during connection failure" + e2); - } - return; - } + } + } else { + tryInsecure = true; + } + + if (tryInsecure) { + // try again using insecure comm if available + try { + //Log.i(TAG,"connecting using createInsecureRfcommSocketToServiceRecord"); + Method m = mmDevice.getClass().getMethod("createInsecureRfcommSocketToServiceRecord", new Class[]{UUID.class}); + mmSocket = (BluetoothSocket) m.invoke(mmDevice, new Object[]{SERVER_UUID}); + //Looper.prepare(); + timerDelayRemoveDialog(mmSocket); + //Looper.loop(); + mmSocket.connect(); + timeOutHandler.removeCallbacks(socketRunable); + if (Looper.myLooper() != null) { + Looper.myLooper().quit(); + } + success = true; + tryInsecure = false; + break; + } catch (NoSuchMethodException ie) { + } catch (IllegalAccessException ie) { + } catch (InvocationTargetException ie) { + } + } + if (tryInsecure) { + // try again using insecure comm if available + try { + //Log.i(TAG,"connecting using createInsecureRfcommSocket()"); + Method m = mmDevice.getClass().getMethod("createInsecureRfcommSocket()", new Class[]{UUID.class}); + mmSocket = (BluetoothSocket) m.invoke(mmDevice, new Object[]{SERVER_UUID}); + //Looper.prepare(); + timerDelayRemoveDialog(mmSocket); + //Looper.loop(); + mmSocket.connect(); + timeOutHandler.removeCallbacks(socketRunable); + if (Looper.myLooper() != null) { + Looper.myLooper().quit(); + } + success = true; + break; + } catch (NoSuchMethodException ie) { + } catch (IllegalAccessException ie) { + } catch (InvocationTargetException ie) { + } + } + } catch (IOException e) { + connectionFailed(); + DebugTool.logError(TAG, e.getClass().getSimpleName() + + " caught connecting to the bluetooth socket: " + + e.toString()); + try { + mmSocket.close(); + } catch (IOException e2) { + DebugTool.logError(TAG, "unable to close() socket during connection failure" + e2); + } + return; + } } // Reset the ConnectThread because we're done - if(success) - { - synchronized (MultiplexBluetoothTransport.this) { - mConnectThread = null; - } - + if (success) { + synchronized (MultiplexBluetoothTransport.this) { + mConnectThread = null; + } - // Start the connected thread - - connected(mmSocket, mmDevice); - } - else - { + + // Start the connected thread + + connected(mmSocket, mmDevice); + } else { DebugTool.logError(TAG, "There was a problem opening up RFCOMM"); } } @@ -653,9 +629,8 @@ public class MultiplexBluetoothTransport extends MultiplexBaseTransport{ mmSocket.close(); } catch (IOException e) { // close() of connect socket failed - } - catch(NullPointerException e){ - //mSocket was pry never initialized + } catch (NullPointerException e) { + //mSocket was pry never initialized } } } diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java index 0cc4cf853..78f78ccb2 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java @@ -149,71 +149,6 @@ public class RouterServiceValidator { } /** - * Main function to call to ensure we are connecting to a validated router service - * @return whether or not the currently running router service can be trusted. - * - * Due to SDL 0220 proposal, we should use validateAsync always. - * This function remains only for backward compatibility. - */ - @Deprecated - public boolean validate(){ - - if(securityLevel == -1){ - securityLevel = getSecurityLevel(context); - } - - if(securityLevel == MultiplexTransportConfig.FLAG_MULTI_SECURITY_OFF){ //If security isn't an issue, just return true; - return true; - } - - PackageManager pm = context.getPackageManager(); - //Grab the package for the currently running router service. We need this call regardless of if we are in debug mode or not. - String packageName = null; - - if(this.service != null){ - DebugTool.logInfo(TAG, "Supplied service name of " + this.service.getClassName()); - if(Build.VERSION.SDK_INT < Build.VERSION_CODES.O && !isServiceRunning(context,this.service)){ - //This means our service isn't actually running, so set to null. Hopefully we can find a real router service after this. - service = null; - DebugTool.logWarning(TAG, "Supplied service is not actually running."); - } else { - // If the running router service is created by this app, the validation is good by default - if (this.service.getPackageName().equals(context.getPackageName())) { - return true; - } - } - } - if(this.service == null){ - if(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ) { - this.service = componentNameForServiceRunning(pm); //Change this to an array if multiple services are started? - if (this.service == null) { //if this is still null we know there is no service running so we can return false - wakeUpRouterServices(); - return false; - } - }else{ - wakeUpRouterServices(); - return false; - } - - } - - //Log.d(TAG, "Checking app package: " + service.getClassName()); - packageName = this.appPackageForComponentName(service, pm); - - - if(packageName!=null){//Make sure there is a service running - if(wasInstalledByAppStore(packageName)){ //Was this package installed from a trusted app store - if( isTrustedPackage(packageName, pm)){//Is this package on the list of trusted apps. - return true; - } - } - }//No running service found. Might need to attempt to start one - //TODO spin up a known good router service - wakeUpRouterServices(); - return false; - } - - /** * Asynchronously validate the target RouterService, which includes finding the right RouterService. * @param callback: callback gets called when validation finishes. */ diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/TCPTransportManager.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/TCPTransportManager.java index aca8789ac..3df010bcf 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/TCPTransportManager.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/TCPTransportManager.java @@ -37,7 +37,7 @@ public class TCPTransportManager extends TransportManagerBase{ transport.stop(); } - @Override + @Deprecated public void resetSession() { if(transport != null){ transport.stop(); diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/TransportManager.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/TransportManager.java index 5039b0e0e..c653c7d93 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/TransportManager.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/TransportManager.java @@ -125,14 +125,6 @@ public class TransportManager extends TransportManagerBase{ } } - @Override - @Deprecated - public void resetSession(){ - if(transport != null){ - transport.resetSession(); - } - } - /** * Check to see if a transport is connected. * @param transportType the transport to have its connection status returned. If `null` is @@ -222,14 +214,6 @@ public class TransportManager extends TransportManagerBase{ return config; } - @Deprecated - public ComponentName getRouterService(){ - if(transport != null) { - return transport.getRouterService(); - } - return null; - } - @Override public void sendPacket(SdlPacket packet){ if(transport !=null){ @@ -249,11 +233,6 @@ public class TransportManager extends TransportManagerBase{ } } - @Deprecated - public void requestSecondaryTransportConnection(byte sessionId, Bundle params){ - transport.requestSecondaryTransportConnection(sessionId, (Bundle)params); - } - @Override public void requestSecondaryTransportConnection(byte sessionId, TransportRecord transportRecord){ if(transportRecord != null){ @@ -284,13 +263,6 @@ public class TransportManager extends TransportManagerBase{ super(context,appId,routerService); } - @SuppressWarnings("deprecation") - @Override - @Deprecated - public boolean onHardwareConnected(TransportType transportType){ - return false; - } - @Override public synchronized boolean onHardwareConnected(List<TransportRecord> transports) { super.onHardwareConnected(transports); |