diff options
author | Joey Grover <joeygrover@gmail.com> | 2017-08-03 13:59:39 -0400 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2017-08-03 13:59:39 -0400 |
commit | 292931e2e311d5a894263e1bc05a04c656571d43 (patch) | |
tree | da3f624680560ee671ec9293e4ef0b9616c7b692 /sdl_android | |
parent | a30a106e06ff5ba192c77dd6b0e520bef20a4239 (diff) | |
download | sdl_android-292931e2e311d5a894263e1bc05a04c656571d43.tar.gz |
Fix improper checks on bluetooth device name
Diffstat (limited to 'sdl_android')
-rw-r--r-- | sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java b/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java index dcca2b4d1..155eb810d 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java +++ b/sdl_android/src/main/java/com/smartdevicelink/transport/MultiplexBluetoothTransport.java @@ -256,16 +256,15 @@ public class MultiplexBluetoothTransport { mConnectedWriteThread = new ConnectedWriteThread(socket); mConnectedWriteThread.start(); - //Store a static name of the device that is connected. We can do this since the only time - //we will access it will be when we receive a CONNECT packet from a device - if(device!=null && device.getName()!=null && device.getName()!=""){ + //Store a static name of the device that is connected. + if(device!=null){ currentlyConnectedDevice = device.getName(); } // Send the name of the connected device back to the UI Activity Message msg = mHandler.obtainMessage(SdlRouterService.MESSAGE_DEVICE_NAME); Bundle bundle = new Bundle(); - bundle.putString(DEVICE_NAME, device.getName()); + bundle.putString(DEVICE_NAME, currentlyConnectedDevice); msg.setData(bundle); mHandler.sendMessage(msg); setState(STATE_CONNECTED); |