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