Fix flashing icons
This commit is contained in:
@@ -107,7 +107,7 @@ class LocalOnlyHotspotService : IpNeighbourMonitoringService() {
|
|||||||
SmartSnackbar.make(message).show()
|
SmartSnackbar.make(message).show()
|
||||||
startFailure()
|
startFailure()
|
||||||
}
|
}
|
||||||
}, app.handler)
|
}, null)
|
||||||
} catch (e: IllegalStateException) {
|
} catch (e: IllegalStateException) {
|
||||||
Timber.w(e)
|
Timber.w(e)
|
||||||
SmartSnackbar.make(e).show()
|
SmartSnackbar.make(e).show()
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ class LocalOnlyHotspotManager(private val parent: TetheringFragment) : Manager()
|
|||||||
private val lookup: Map<String, NetworkInterface> get() = parent.ifaceLookup
|
private val lookup: Map<String, NetworkInterface> get() = parent.ifaceLookup
|
||||||
|
|
||||||
override val icon: Int get() {
|
override val icon: Int get() {
|
||||||
val iface = binder?.iface ?: return TetherType.WIFI.icon
|
val iface = binder?.iface
|
||||||
return TetherType.ofInterface(iface).icon
|
return (if (iface.isNullOrBlank()) TetherType.WIFI else TetherType.ofInterface(iface)).icon
|
||||||
}
|
}
|
||||||
override val title: CharSequence get() {
|
override val title: CharSequence get() {
|
||||||
val configuration = binder?.configuration ?: return parent.getString(R.string.tethering_temp_hotspot)
|
val configuration = binder?.configuration ?: return parent.getString(R.string.tethering_temp_hotspot)
|
||||||
|
|||||||
Reference in New Issue
Block a user