mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-24 05:04:50 -04:00
Fix Hotspot Ip address For Android pie
This commit is contained in:
parent
e71f3b4341
commit
45208f64a7
@ -141,12 +141,21 @@ public class WebServerHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ip.length() > 14) {
|
||||||
|
for (int i = 15, j = 12; i < 18; i++, j++) {
|
||||||
|
if ((ip.charAt(i) == '.')) {
|
||||||
|
ip = ip.substring(0, j + 1); //from first char to 12
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ip += "Something Wrong! " + e.toString() + "\n";
|
ip += "Something Wrong! " + e.toString() + "\n";
|
||||||
}
|
};
|
||||||
Log.v("DANG", "Returning : " + "http://" + ip);
|
|
||||||
|
Log.v("DANG", "Returning : " + "http://" + ip)
|
||||||
return "http://" + ip;
|
return "http://" + ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user