mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Fix retreiving an empty MAC address string on some devices
This commit is contained in:
parent
6a695d2c72
commit
ab1e47edb4
@ -62,7 +62,8 @@ public class NvConnection {
|
|||||||
NetworkInterface iface = ifaceList.nextElement();
|
NetworkInterface iface = ifaceList.nextElement();
|
||||||
|
|
||||||
if (iface.getName().startsWith("wlan") &&
|
if (iface.getName().startsWith("wlan") &&
|
||||||
iface.getHardwareAddress() != null) {
|
iface.getHardwareAddress() != null &&
|
||||||
|
iface.getHardwareAddress().length > 0) {
|
||||||
selectedIface = iface;
|
selectedIface = iface;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,7 +74,8 @@ public class NvConnection {
|
|||||||
NetworkInterface iface = ifaceList.nextElement();
|
NetworkInterface iface = ifaceList.nextElement();
|
||||||
|
|
||||||
if (iface.getName().startsWith("eth") &&
|
if (iface.getName().startsWith("eth") &&
|
||||||
iface.getHardwareAddress() != null) {
|
iface.getHardwareAddress() != null &&
|
||||||
|
iface.getHardwareAddress().length > 0) {
|
||||||
selectedIface = iface;
|
selectedIface = iface;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,7 +85,8 @@ public class NvConnection {
|
|||||||
while (selectedIface == null && ifaceList.hasMoreElements()) {
|
while (selectedIface == null && ifaceList.hasMoreElements()) {
|
||||||
NetworkInterface iface = ifaceList.nextElement();
|
NetworkInterface iface = ifaceList.nextElement();
|
||||||
|
|
||||||
if (iface.getHardwareAddress() != null) {
|
if (iface.getHardwareAddress() != null &&
|
||||||
|
iface.getHardwareAddress().length > 0) {
|
||||||
selectedIface = iface;
|
selectedIface = iface;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user