summaryrefslogtreecommitdiff
path: root/sdl_android
diff options
context:
space:
mode:
authorTuan Nguyen <tnguy238@ford.com>2017-05-24 10:01:53 -0700
committerTuan Nguyen <tnguy238@ford.com>2017-05-24 10:01:53 -0700
commitfddca9a10b07e78499dd38c29db6873ad3aef246 (patch)
tree960f1c1ecb50739441480a89eef59543ed303bac /sdl_android
parentbb8d13b8ec49006be38b46521c6e3219017153dd (diff)
downloadsdl_android-fddca9a10b07e78499dd38c29db6873ad3aef246.tar.gz
#464 Perform null check before init Looperbugfix/issue_464
Diffstat (limited to 'sdl_android')
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/transport/SdlRouterServiceTests.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/transport/SdlRouterServiceTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/transport/SdlRouterServiceTests.java
index 83e9a7780..36274b99d 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/transport/SdlRouterServiceTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/transport/SdlRouterServiceTests.java
@@ -34,7 +34,9 @@ public class SdlRouterServiceTests extends AndroidTestCase {
* msg.what == TransportConstants.ROUTER_RECEIVED_PACKET
*/
public void testAlTransportHandlerHandleNullBundle() {
- Looper.prepare();
+ if (Looper.myLooper() == null) {
+ Looper.prepare();
+ }
class AltTransportHandler extends Handler {
ClassLoader loader;
final WeakReference<SdlRouterService> provider;