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