diff --git a/android/android/AndroidSonarClient.java b/android/android/AndroidSonarClient.java index 40c9a7ed4..a648188b4 100644 --- a/android/android/AndroidSonarClient.java +++ b/android/android/AndroidSonarClient.java @@ -16,16 +16,19 @@ import com.facebook.sonar.core.SonarClient; public final class AndroidSonarClient { private static boolean sIsInitialized = false; private static SonarThread sSonarThread; + private static SonarThread sConnectionThread; public static synchronized SonarClient getInstance(Context context) { if (!sIsInitialized) { - sSonarThread = new SonarThread(); + sSonarThread = new SonarThread("SonarEventBaseThread"); sSonarThread.start(); + sConnectionThread = new SonarThread("SonarConnectionThread"); + sConnectionThread.start(); final Context app = context.getApplicationContext(); SonarClientImpl.init( sSonarThread.getEventBase(), - sSonarThread.getEventBase(), + sConnectionThread.getEventBase(), getServerHost(app), "Android", getFriendlyDeviceName(), diff --git a/android/android/SonarThread.java b/android/android/SonarThread.java index 608fb5a62..f3edeeb22 100644 --- a/android/android/SonarThread.java +++ b/android/android/SonarThread.java @@ -13,8 +13,8 @@ import javax.annotation.Nullable; class SonarThread extends Thread { private @Nullable EventBase mEventBase; - SonarThread() { - super("SonarEventBaseThread"); + SonarThread(final String name) { + super(name); } @Override