Refine updateNotif in TetheringService
This commit is contained in:
@@ -101,7 +101,7 @@ class TetheringService : IpNeighbourMonitoringService(), TetheringManager.Tether
|
|||||||
TetheringManager.registerTetheringEventCallbackCompat(this, this)
|
TetheringManager.registerTetheringEventCallbackCompat(this, this)
|
||||||
IpNeighbourMonitor.registerCallback(this)
|
IpNeighbourMonitor.registerCallback(this)
|
||||||
}
|
}
|
||||||
updateNotification()
|
super.updateNotification()
|
||||||
}
|
}
|
||||||
launch(Dispatchers.Main) { binder.routingsChanged() }
|
launch(Dispatchers.Main) { binder.routingsChanged() }
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ class TetheringService : IpNeighbourMonitoringService(), TetheringManager.Tether
|
|||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
BootReceiver.startIfEnabled()
|
BootReceiver.startIfEnabled()
|
||||||
// call this first just in case we are shutting down immediately
|
// call this first just in case we are shutting down immediately
|
||||||
updateNotification()
|
super.updateNotification()
|
||||||
launch {
|
launch {
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
for (iface in intent.getStringArrayExtra(EXTRA_ADD_INTERFACES) ?: emptyArray()) {
|
for (iface in intent.getStringArrayExtra(EXTRA_ADD_INTERFACES) ?: emptyArray()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user