Refine code style
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
package be.mygod.vpnhotspot.net
|
package be.mygod.vpnhotspot.net
|
||||||
|
|
||||||
import android.net.MacAddress
|
import android.net.MacAddress
|
||||||
import android.os.Parcelable
|
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import kotlinx.android.parcel.Parcelize
|
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
import java.nio.ByteOrder
|
import java.nio.ByteOrder
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ abstract class IpMonitor : Runnable {
|
|||||||
companion object {
|
companion object {
|
||||||
const val KEY = "service.ipMonitor"
|
const val KEY = "service.ipMonitor"
|
||||||
// https://android.googlesource.com/platform/external/iproute2/+/7f7a711/lib/libnetlink.c#493
|
// https://android.googlesource.com/platform/external/iproute2/+/7f7a711/lib/libnetlink.c#493
|
||||||
private val errorMatcher = "(^Cannot bind netlink socket: |Dump (was interrupted and may be inconsistent.|terminated)$)"
|
private val errorMatcher = ("(^Cannot bind netlink socket: |" +
|
||||||
.toRegex()
|
"Dump (was interrupted and may be inconsistent.|terminated)$)").toRegex()
|
||||||
private val currentMode: Mode get() {
|
private val currentMode: Mode get() {
|
||||||
val defaultMode = if (Build.VERSION.SDK_INT < 30) @Suppress("DEPRECATION") {
|
val defaultMode = if (Build.VERSION.SDK_INT < 30) @Suppress("DEPRECATION") {
|
||||||
Mode.Poll
|
Mode.Poll
|
||||||
|
|||||||
Reference in New Issue
Block a user