Rename System to JniHelper to rename naming conflicts with

`java.lang.System`
This commit is contained in:
Mygod
2017-01-24 16:58:20 +08:00
parent 04e0cb02b5
commit dadeffa903
6 changed files with 19 additions and 19 deletions
@@ -291,7 +291,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
var tries = 1
while (tries < 5) {
Thread.sleep(1000 * tries)
if (System.sendfd(fd, new File(getFilesDir, "sock_path").getAbsolutePath) != -1) {
if (JniHelper.sendFd(fd, new File(getFilesDir, "sock_path").getAbsolutePath) != -1) {
return true
}
tries += 1
@@ -92,7 +92,7 @@ class ShadowsocksVpnThread(service: ShadowsocksVpnService) extends Thread {
val ret = service.protect(fd)
// Trick to close file decriptor
System.jniclose(fd)
JniHelper.close(fd)
if (ret) {
output.write(0)