Implement MAC lookup (#68)
* Implement MAC lookup * Refine error processing * Use long to store MAC consistently * Link back to macvendors.co * Undo some havoc * Do not show mac spans for TV * Show MAC and IP in a consistent order * Add IP spans by ipinfo.io * Add SpanFormatter * Fix IPv6 ipinfo.io link * Refine SpanFormatter * Fix pressing the link
This commit is contained in:
@@ -35,7 +35,7 @@ class InterfaceManager(private val parent: TetheringFragment, val iface: String)
|
||||
override val active get() = parent.binder?.isActive(iface) == true
|
||||
}
|
||||
|
||||
val addresses = parent.ifaceLookup[iface]?.formatAddresses() ?: ""
|
||||
private val addresses = parent.ifaceLookup[iface]?.formatAddresses() ?: ""
|
||||
override val type get() = VIEW_TYPE_INTERFACE
|
||||
private val data = Data()
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.net.wifi.WifiConfiguration
|
||||
import android.net.wifi.p2p.WifiP2pGroup
|
||||
import android.os.Bundle
|
||||
import android.os.IBinder
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.view.WindowManager
|
||||
import android.widget.EditText
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
@@ -32,7 +33,11 @@ import java.net.NetworkInterface
|
||||
import java.net.SocketException
|
||||
|
||||
class RepeaterManager(private val parent: TetheringFragment) : Manager(), ServiceConnection {
|
||||
class ViewHolder(val binding: ListitemRepeaterBinding) : RecyclerView.ViewHolder(binding.root)
|
||||
class ViewHolder(val binding: ListitemRepeaterBinding) : RecyclerView.ViewHolder(binding.root) {
|
||||
init {
|
||||
binding.addresses.movementMethod = LinkMovementMethod.getInstance()
|
||||
}
|
||||
}
|
||||
inner class Data : BaseObservable() {
|
||||
val switchEnabled: Boolean
|
||||
@Bindable get() = when (binder?.service?.status) {
|
||||
|
||||
Reference in New Issue
Block a user