Move monitors to a separate package
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package be.mygod.vpnhotspot
|
||||
|
||||
import android.app.Service
|
||||
import be.mygod.vpnhotspot.net.IpNeighbour
|
||||
import be.mygod.vpnhotspot.net.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbour
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbourMonitor
|
||||
|
||||
abstract class IpNeighbourMonitoringService : Service(), IpNeighbourMonitor.Callback {
|
||||
private var neighbours = emptyList<IpNeighbour>()
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.net.wifi.WifiManager
|
||||
import androidx.annotation.RequiresApi
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
import be.mygod.vpnhotspot.manage.LocalOnlyHotspotManager
|
||||
import be.mygod.vpnhotspot.net.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.TetheringManager
|
||||
import be.mygod.vpnhotspot.util.broadcastReceiver
|
||||
import be.mygod.vpnhotspot.widget.SmartSnackbar
|
||||
|
||||
@@ -3,7 +3,7 @@ package be.mygod.vpnhotspot
|
||||
import android.content.Context
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
import be.mygod.vpnhotspot.net.Routing
|
||||
import be.mygod.vpnhotspot.net.UpstreamMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.UpstreamMonitor
|
||||
import be.mygod.vpnhotspot.widget.SmartSnackbar
|
||||
import timber.log.Timber
|
||||
import java.net.InetAddress
|
||||
|
||||
@@ -12,7 +12,7 @@ import androidx.preference.Preference
|
||||
import androidx.preference.SwitchPreference
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
import be.mygod.vpnhotspot.net.Routing
|
||||
import be.mygod.vpnhotspot.net.UpstreamMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.UpstreamMonitor
|
||||
import be.mygod.vpnhotspot.preference.AlwaysAutoCompleteEditTextPreferenceDialogFragmentCompat
|
||||
import be.mygod.vpnhotspot.preference.SharedPreferenceDataStore
|
||||
import be.mygod.vpnhotspot.util.RootSession
|
||||
|
||||
@@ -4,10 +4,10 @@ import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
import be.mygod.vpnhotspot.manage.TetheringFragment
|
||||
import be.mygod.vpnhotspot.net.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.Routing
|
||||
import be.mygod.vpnhotspot.net.TetheringManager
|
||||
import be.mygod.vpnhotspot.net.UpstreamMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.UpstreamMonitor
|
||||
import be.mygod.vpnhotspot.util.broadcastReceiver
|
||||
import be.mygod.vpnhotspot.widget.SmartSnackbar
|
||||
import timber.log.Timber
|
||||
|
||||
@@ -10,7 +10,7 @@ import androidx.recyclerview.widget.DiffUtil
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
import be.mygod.vpnhotspot.R
|
||||
import be.mygod.vpnhotspot.net.InetAddressComparator
|
||||
import be.mygod.vpnhotspot.net.IpNeighbour
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbour
|
||||
import be.mygod.vpnhotspot.net.TetherType
|
||||
import be.mygod.vpnhotspot.room.AppDatabase
|
||||
import be.mygod.vpnhotspot.room.lookup
|
||||
|
||||
@@ -5,8 +5,8 @@ import android.content.*
|
||||
import android.net.wifi.p2p.WifiP2pDevice
|
||||
import android.os.IBinder
|
||||
import be.mygod.vpnhotspot.RepeaterService
|
||||
import be.mygod.vpnhotspot.net.IpNeighbour
|
||||
import be.mygod.vpnhotspot.net.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbour
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.TetheringManager
|
||||
import be.mygod.vpnhotspot.util.StickyEvent1
|
||||
import be.mygod.vpnhotspot.util.broadcastReceiver
|
||||
|
||||
@@ -27,8 +27,8 @@ import be.mygod.vpnhotspot.BR
|
||||
import be.mygod.vpnhotspot.R
|
||||
import be.mygod.vpnhotspot.databinding.FragmentClientsBinding
|
||||
import be.mygod.vpnhotspot.databinding.ListitemClientBinding
|
||||
import be.mygod.vpnhotspot.net.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.TrafficRecorder
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbourMonitor
|
||||
import be.mygod.vpnhotspot.net.monitor.TrafficRecorder
|
||||
import be.mygod.vpnhotspot.room.*
|
||||
import be.mygod.vpnhotspot.util.ServiceForegroundConnector
|
||||
import be.mygod.vpnhotspot.util.toPluralInt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package be.mygod.vpnhotspot.client
|
||||
|
||||
import be.mygod.vpnhotspot.net.IpNeighbour
|
||||
import be.mygod.vpnhotspot.net.monitor.IpNeighbour
|
||||
|
||||
class TetheringClient(private val neighbour: IpNeighbour) : Client() {
|
||||
override val iface get() = neighbour.dev
|
||||
|
||||
@@ -11,6 +11,7 @@ import be.mygod.vpnhotspot.R
|
||||
import be.mygod.vpnhotspot.client.Client
|
||||
import be.mygod.vpnhotspot.client.ClientMonitorService
|
||||
import be.mygod.vpnhotspot.debugLog
|
||||
import be.mygod.vpnhotspot.net.monitor.TrafficRecorder
|
||||
import be.mygod.vpnhotspot.util.RootSession
|
||||
import be.mygod.vpnhotspot.util.computeIfAbsentCompat
|
||||
import be.mygod.vpnhotspot.util.stopAndUnbind
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package be.mygod.vpnhotspot.net
|
||||
package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package be.mygod.vpnhotspot.net
|
||||
package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import android.util.Log
|
||||
import be.mygod.vpnhotspot.R
|
||||
import be.mygod.vpnhotspot.util.thread
|
||||
import be.mygod.vpnhotspot.widget.SmartSnackbar
|
||||
@@ -1,4 +1,4 @@
|
||||
package be.mygod.vpnhotspot.net
|
||||
package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import be.mygod.vpnhotspot.util.parseNumericAddressNoThrow
|
||||
import timber.log.Timber
|
||||
@@ -1,4 +1,4 @@
|
||||
package be.mygod.vpnhotspot.net
|
||||
package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
import be.mygod.vpnhotspot.debugLog
|
||||
@@ -1,4 +1,4 @@
|
||||
package be.mygod.vpnhotspot.net
|
||||
package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import android.os.SystemClock
|
||||
import android.util.LongSparseArray
|
||||
@@ -1,4 +1,4 @@
|
||||
package be.mygod.vpnhotspot.net
|
||||
package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import android.content.SharedPreferences
|
||||
import be.mygod.vpnhotspot.App.Companion.app
|
||||
@@ -1,4 +1,4 @@
|
||||
package be.mygod.vpnhotspot.net
|
||||
package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import android.net.ConnectivityManager
|
||||
import android.net.Network
|
||||
Reference in New Issue
Block a user