Various bugfixes
This commit is contained in:
@@ -90,7 +90,7 @@ dependencies {
|
||||
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.0.0'
|
||||
implementation 'net.glxn.qrgen:android:2.0'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0-M2'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0-RC'
|
||||
for (dep in aux) {
|
||||
freedomImplementation dep
|
||||
googleImplementation dep
|
||||
|
||||
@@ -255,7 +255,7 @@ class RepeaterService : Service(), CoroutineScope, WifiP2pManager.ChannelListene
|
||||
if (Build.VERSION.SDK_INT >= 26 && app.uiMode.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION) {
|
||||
showNotification()
|
||||
}
|
||||
unregisterReceiver()
|
||||
launch {
|
||||
registerReceiver(receiver, intentFilter(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION,
|
||||
WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION))
|
||||
receiverRegistered = true
|
||||
@@ -278,6 +278,7 @@ class RepeaterService : Service(), CoroutineScope, WifiP2pManager.ChannelListene
|
||||
Timber.w(e)
|
||||
startFailure(e.readableMessage)
|
||||
}
|
||||
}
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
/**
|
||||
@@ -389,14 +390,11 @@ class RepeaterService : Service(), CoroutineScope, WifiP2pManager.ChannelListene
|
||||
}
|
||||
})
|
||||
}
|
||||
private fun unregisterReceiver() {
|
||||
private fun cleanLocked() {
|
||||
if (receiverRegistered) {
|
||||
unregisterReceiver(receiver)
|
||||
receiverRegistered = false
|
||||
}
|
||||
}
|
||||
private fun cleanLocked() {
|
||||
unregisterReceiver()
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
timeoutMonitor?.close()
|
||||
timeoutMonitor = null
|
||||
|
||||
@@ -62,7 +62,7 @@ class IpNeighbourMonitor private constructor() : IpMonitor() {
|
||||
|
||||
private fun postUpdateLocked() {
|
||||
if (updatePosted || instance != this) return
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
GlobalScope.launch {
|
||||
val neighbours = synchronized(neighbours) {
|
||||
updatePosted = false
|
||||
neighbours.values.toList()
|
||||
|
||||
Reference in New Issue
Block a user