diff options
| author | RHenigan <heniganr1@gmail.com> | 2020-06-30 09:13:27 -0400 |
|---|---|---|
| committer | RHenigan <heniganr1@gmail.com> | 2020-06-30 09:13:27 -0400 |
| commit | e58a6e712a0a2e99d207aee8e7329da247a7eaab (patch) | |
| tree | f24522992b69f552c298d1d90f2ef11c566629d4 | |
| parent | c36bafe809ea08163dba312a5979f05b0cef6389 (diff) | |
| download | sdl_android-bugfix/issue_1377_logging.tar.gz | |
Fix deprecated Log callsbugfix/issue_1377_logging
2 files changed, 7 insertions, 7 deletions
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlBroadcastReceiver.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlBroadcastReceiver.java index ce2e37854..dff9efb0d 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlBroadcastReceiver.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlBroadcastReceiver.java @@ -289,15 +289,15 @@ public abstract class SdlBroadcastReceiver extends BroadcastReceiver{ if (sdlAppInfoList != null && !sdlAppInfoList.isEmpty() && sdlAppInfoList.get(0).getRouterServiceComponentName() != null) { routerServicePackage = sdlAppInfoList.get(0).getRouterServiceComponentName().getPackageName(); } - DebugTool.logInfo(TAG + ": This app's package: " + myPackage); - DebugTool.logInfo(TAG + ": Router service app's package: " + routerServicePackage); + DebugTool.logInfo(TAG, ": This app's package: " + myPackage); + DebugTool.logInfo(TAG, ": Router service app's package: " + routerServicePackage); if (myPackage != null && myPackage.equalsIgnoreCase(routerServicePackage)) { SdlDeviceListener sdlDeviceListener = getSdlDeviceListener(context, device); if (!sdlDeviceListener.isRunning()) { sdlDeviceListener.start(); } } else { - DebugTool.logInfo(TAG + ": Not the app to start the router service nor device listener"); + DebugTool.logInfo(TAG, ": Not the app to start the router service nor device listener"); } return; } diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/utl/SdlDeviceListener.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/utl/SdlDeviceListener.java index a396d186e..488a117b4 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/utl/SdlDeviceListener.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/utl/SdlDeviceListener.java @@ -85,7 +85,7 @@ public class SdlDeviceListener { */ public void start() { if(connectedDevice == null) { - DebugTool.logInfo(TAG + ": No supplied bluetooth device"); + DebugTool.logInfo(TAG, ": No supplied bluetooth device"); if(callback != null){ callback.onTransportError(null); } @@ -93,7 +93,7 @@ public class SdlDeviceListener { } if (hasSDLConnected(contextWeakReference.get(), connectedDevice.getAddress())) { - DebugTool.logInfo(TAG + ": Confirmed SDL device, should start router service"); + DebugTool.logInfo(TAG, ": Confirmed SDL device, should start router service"); //This device has connected to SDL previously, it is ok to start the RS right now callback.onTransportConnected(contextWeakReference.get(), connectedDevice); return; @@ -113,7 +113,7 @@ public class SdlDeviceListener { if (bluetoothTransport != null) { int state = bluetoothTransport.getState(); if (state != MultiplexBluetoothTransport.STATE_CONNECTED) { - DebugTool.logInfo(TAG + ": No bluetooth connection made"); + DebugTool.logInfo(TAG, ": No bluetooth connection made"); bluetoothTransport.stop(); } //else BT is connected; it will close itself through callbacks } @@ -188,7 +188,7 @@ public class SdlDeviceListener { public static void setSDLConnectedStatus(Context context, String address, boolean hasSDLConnected) { synchronized (LOCK) { if (context != null) { - DebugTool.logInfo(TAG + ": Saving connected status - " + address + " : " + hasSDLConnected); + DebugTool.logInfo(TAG, ": Saving connected status - " + address + " : " + hasSDLConnected); SharedPreferences preferences = context.getSharedPreferences(SDL_DEVICE_STATUS_SHARED_PREFS, Context.MODE_PRIVATE); if (preferences.contains(address) && hasSDLConnected == preferences.getBoolean(address, false)) { //The same key/value exists in our shared preferences. No reason to write again. |
