Rename System to JniHelper to rename naming conflicts with
`java.lang.System`
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user