Lint
This commit is contained in:
parent
3e7900da61
commit
95270c0e44
|
@ -15,6 +15,7 @@ object FailureHandler {
|
|||
private val ttlFails = AtomicInteger(0)
|
||||
private val nFails = AtomicInteger(0)
|
||||
private val nFailsBeforePing = AtomicInteger(0)
|
||||
|
||||
// This is the last eventSource opened
|
||||
private val eventSource: AtomicReference<EventSource?> = AtomicReference(null)
|
||||
|
||||
|
|
|
@ -50,11 +50,14 @@ class RestartNetworkCallback(val context: Context) : ConnectivityManager.Network
|
|||
} ?: run {
|
||||
Log.d(TAG, "Registering new ConnectivityManager")
|
||||
try {
|
||||
connectivityManager.set((
|
||||
context.getSystemService(Service.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
connectivityManager.set(
|
||||
(
|
||||
context.getSystemService(Service.CONNECTIVITY_SERVICE)
|
||||
as ConnectivityManager
|
||||
).apply {
|
||||
registerDefaultNetworkCallback(this@RestartNetworkCallback)
|
||||
})
|
||||
}
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ open class AppNotification(
|
|||
private val context: Context,
|
||||
private val notificationId: Int,
|
||||
private val notificationData: NotificationData,
|
||||
private val channelData: ChannelData,
|
||||
private val channelData: ChannelData
|
||||
) {
|
||||
private fun createNotificationChannel() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
|
Loading…
Reference in New Issue