Fix flashing icons

This commit is contained in:
Mygod
2019-01-06 01:43:19 +08:00
parent e6943c69dd
commit 8b7b0b0b3e
2 changed files with 3 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ class LocalOnlyHotspotService : IpNeighbourMonitoringService() {
SmartSnackbar.make(message).show()
startFailure()
}
}, app.handler)
}, null)
} catch (e: IllegalStateException) {
Timber.w(e)
SmartSnackbar.make(e).show()

View File

@@ -76,8 +76,8 @@ class LocalOnlyHotspotManager(private val parent: TetheringFragment) : Manager()
private val lookup: Map<String, NetworkInterface> get() = parent.ifaceLookup
override val icon: Int get() {
val iface = binder?.iface ?: return TetherType.WIFI.icon
return TetherType.ofInterface(iface).icon
val iface = binder?.iface
return (if (iface.isNullOrBlank()) TetherType.WIFI else TetherType.ofInterface(iface)).icon
}
override val title: CharSequence get() {
val configuration = binder?.configuration ?: return parent.getString(R.string.tethering_temp_hotspot)