Add workaround for NPE in getNetworkInterfaces()

This commit is contained in:
Cameron Gutman 2021-08-18 00:04:34 -05:00
parent c6d9889182
commit 597582ddd8

View File

@ -88,11 +88,11 @@ public class AddComputerManually extends Activity {
// Couldn't find a matching interface
return true;
} catch (SocketException e) {
} catch (Exception e) {
// Catch all exceptions because some broken Android devices
// will throw an NPE from inside getNetworkInterfaces().
e.printStackTrace();
return false;
} catch (UnknownHostException e) {
return false;
}
}