2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 21:27:40 +00:00

More unclosed stuff found by lgtm.com

This commit is contained in:
Albert Vaca Cintora 2019-04-18 21:06:56 +02:00
parent aa776739b7
commit 235e93be5e

View File

@ -36,9 +36,8 @@ public class NetworkHelper {
return false; //We are connected to at least one non-mobile network
}
if (mobile) { //We suspect we are on a mobile net
try {
try (LineNumberReader is = new LineNumberReader(new FileReader("/proc/net/arp"))) {
//Check the number of network neighbours, on data it should be 0
LineNumberReader is = new LineNumberReader(new FileReader("/proc/net/arp"));
is.skip(Long.MAX_VALUE);
//Log.e("NetworkHelper", "procnetarp has " + is.getLineNumber() + " lines");
if (is.getLineNumber() > 1) { //The first line are the headers