Refine code style

This commit is contained in:
Mygod
2020-06-11 05:47:50 +08:00
parent b20e3ab4a7
commit 2223082841
2 changed files with 2 additions and 4 deletions

View File

@@ -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

View File

@@ -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