diff options
author | Joey Grover <joeygrover@gmail.com> | 2018-03-27 18:26:39 -0400 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2018-03-27 18:26:39 -0400 |
commit | 67ec3cf18e0a5606c291a6b0d6fa4f8deb2d675c (patch) | |
tree | 52c308d00a878c49d6b89d1da34f0dfcb4dbf2ab | |
parent | 59faf9c44b1d80bd2ed98898769579ec2b20182b (diff) | |
download | sdl_android-67ec3cf18e0a5606c291a6b0d6fa4f8deb2d675c.tar.gz |
Put timeoutHandler for ServiceFinder on MainLooper so it doesn’t failbugfix/handler_post_fail
-rw-r--r-- | sdl_android/src/main/java/com/smartdevicelink/util/ServiceFinder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/util/ServiceFinder.java b/sdl_android/src/main/java/com/smartdevicelink/util/ServiceFinder.java index c115d046c..ba19310e8 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/util/ServiceFinder.java +++ b/sdl_android/src/main/java/com/smartdevicelink/util/ServiceFinder.java @@ -7,6 +7,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ResolveInfo; import android.os.Handler; +import android.os.Looper; import android.util.Log; import com.smartdevicelink.transport.SdlRouterService; @@ -51,7 +52,7 @@ public class ServiceFinder { onFinished(); } }; - timeoutHandler = new Handler(); + timeoutHandler = new Handler(Looper.getMainLooper()); timeoutHandler.postDelayed(timeoutRunnable, TIMEOUT + (50 * packageName.length())); //Send out our broadcast |