Migrate to better MAC lookup

This commit is contained in:
Mygod
2021-05-05 11:49:15 -04:00
parent 5d23c96244
commit 0adb857b2d
3 changed files with 21 additions and 24 deletions

View File

@@ -86,7 +86,8 @@ fun makeIpSpan(ip: InetAddress) = ip.hostAddress.let {
}
}
fun makeMacSpan(mac: String) = if (app.hasTouch) SpannableString(mac).apply {
setSpan(CustomTabsUrlSpan("https://macvendors.co/results/$mac"), 0, length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
setSpan(CustomTabsUrlSpan("https://maclookup.app/search/result?mac=" + mac.substring(0, 13)),
0, length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
} else mac
fun NetworkInterface.formatAddresses(macOnly: Boolean = false) = SpannableStringBuilder().apply {