mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +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();
|
||||
|
||||
if (iface.getName().startsWith("wlan") &&
|
||||
iface.getHardwareAddress() != null) {
|
||||
iface.getHardwareAddress() != null &&
|
||||
iface.getHardwareAddress().length > 0) {
|
||||
selectedIface = iface;
|
||||
}
|
||||
}
|
||||
@ -73,7 +74,8 @@ public class NvConnection {
|
||||
NetworkInterface iface = ifaceList.nextElement();
|
||||
|
||||
if (iface.getName().startsWith("eth") &&
|
||||
iface.getHardwareAddress() != null) {
|
||||
iface.getHardwareAddress() != null &&
|
||||
iface.getHardwareAddress().length > 0) {
|
||||
selectedIface = iface;
|
||||
}
|
||||
}
|
||||
@ -83,7 +85,8 @@ public class NvConnection {
|
||||
while (selectedIface == null && ifaceList.hasMoreElements()) {
|
||||
NetworkInterface iface = ifaceList.nextElement();
|
||||
|
||||
if (iface.getHardwareAddress() != null) {
|
||||
if (iface.getHardwareAddress() != null &&
|
||||
iface.getHardwareAddress().length > 0) {
|
||||
selectedIface = iface;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user