mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-23 16:56:41 +00:00
Fix retreiving an empty MAC address string on some devices
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user