diff --git a/android/src/main/java/com/tradle/react/UdpSenderTask.java b/android/src/main/java/com/tradle/react/UdpSenderTask.java index e8605b7..925f94a 100644 --- a/android/src/main/java/com/tradle/react/UdpSenderTask.java +++ b/android/src/main/java/com/tradle/react/UdpSenderTask.java @@ -26,7 +26,7 @@ public class UdpSenderTask extends AsyncTask(listener); + this.mListener = new WeakReference(listener); } @Override diff --git a/android/src/main/java/com/tradle/react/UdpSocketClient.java b/android/src/main/java/com/tradle/react/UdpSocketClient.java index 881dff5..5c5c8f4 100644 --- a/android/src/main/java/com/tradle/react/UdpSocketClient.java +++ b/android/src/main/java/com/tradle/react/UdpSocketClient.java @@ -44,7 +44,7 @@ public final class UdpSocketClient implements UdpReceiverTask.OnDataReceivedList this.mReceiverListener = builder.receiverListener; this.mExceptionListener = builder.exceptionListener; this.mReuseAddress = builder.reuse; - this.mPendingSends = new ConcurrentHashMap<>(); + this.mPendingSends = new ConcurrentHashMap(); } /** diff --git a/android/src/main/java/com/tradle/react/UdpSockets.java b/android/src/main/java/com/tradle/react/UdpSockets.java index de355d7..15af71d 100644 --- a/android/src/main/java/com/tradle/react/UdpSockets.java +++ b/android/src/main/java/com/tradle/react/UdpSockets.java @@ -37,7 +37,7 @@ public final class UdpSockets extends ReactContextBaseJavaModule private static final String TAG = "UdpSockets"; private WifiManager.MulticastLock mMulticastLock; - private SparseArray mClients = new SparseArray<>(); + private SparseArray mClients = new SparseArray(); private boolean mShuttingDown = false; public UdpSockets(ReactApplicationContext reactContext) { diff --git a/android/src/main/java/com/tradle/react/UdpSocketsModule.java b/android/src/main/java/com/tradle/react/UdpSocketsModule.java index 903a64d..d6f42be 100644 --- a/android/src/main/java/com/tradle/react/UdpSocketsModule.java +++ b/android/src/main/java/com/tradle/react/UdpSocketsModule.java @@ -23,7 +23,7 @@ public final class UdpSocketsModule implements ReactPackage { @Override public List createNativeModules( ReactApplicationContext reactContext) { - List modules = new ArrayList<>(); + List modules = new ArrayList(); modules.add(new UdpSockets(reactContext));