Move Utils.kt

This commit is contained in:
Mygod
2018-05-09 15:57:41 -07:00
parent e72dad8790
commit 90c1951645
11 changed files with 27 additions and 12 deletions

View File

@@ -4,8 +4,8 @@ import android.os.Handler
import android.util.Log
import be.mygod.vpnhotspot.App.Companion.app
import be.mygod.vpnhotspot.R
import be.mygod.vpnhotspot.debugLog
import be.mygod.vpnhotspot.thread
import be.mygod.vpnhotspot.util.debugLog
import be.mygod.vpnhotspot.util.thread
import java.io.InterruptedIOException
import java.util.concurrent.Executors
import java.util.concurrent.ScheduledExecutorService
@@ -57,7 +57,8 @@ class IpNeighbourMonitor private constructor() : Runnable {
thread("$TAG-error") {
try {
monitor.errorStream.bufferedReader().forEachLine { Log.e(TAG, it) }
} catch (ignore: InterruptedIOException) { }
} catch (ignore: InterruptedIOException) {
}
}
try {
monitor.inputStream.bufferedReader().forEachLine {
@@ -76,7 +77,8 @@ class IpNeighbourMonitor private constructor() : Runnable {
val pool = Executors.newScheduledThreadPool(1)
pool.scheduleAtFixedRate(this, 1, 1, TimeUnit.SECONDS)
this.pool = pool
} catch (ignore: InterruptedIOException) { }
} catch (ignore: InterruptedIOException) {
}
}
}

View File

@@ -3,8 +3,8 @@ package be.mygod.vpnhotspot.net
import android.os.Build
import be.mygod.vpnhotspot.App.Companion.app
import be.mygod.vpnhotspot.R
import be.mygod.vpnhotspot.debugLog
import be.mygod.vpnhotspot.noisySu
import be.mygod.vpnhotspot.util.debugLog
import be.mygod.vpnhotspot.util.noisySu
import java.net.Inet4Address
import java.net.InetAddress
import java.net.NetworkInterface

View File

@@ -5,7 +5,7 @@ import android.net.Network
import android.net.NetworkCapabilities
import android.net.NetworkRequest
import be.mygod.vpnhotspot.App.Companion.app
import be.mygod.vpnhotspot.debugLog
import be.mygod.vpnhotspot.util.debugLog
import java.net.InetAddress
object VpnMonitor : ConnectivityManager.NetworkCallback() {

View File

@@ -5,8 +5,8 @@ import android.os.Build
import android.util.Log
import android.widget.Toast
import be.mygod.vpnhotspot.App.Companion.app
import be.mygod.vpnhotspot.loggerSu
import be.mygod.vpnhotspot.noisySu
import be.mygod.vpnhotspot.util.loggerSu
import be.mygod.vpnhotspot.util.noisySu
import java.io.File
class P2pSupplicantConfiguration {