TunnelManager: convert to kotlin

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2020-03-26 23:21:54 -06:00
parent b2bbaf050c
commit 37949ba1ec
6 changed files with 252 additions and 317 deletions
@@ -72,7 +72,7 @@ class Application : android.app.Application(), OnSharedPreferenceChangeListener
}
tunnelManager = TunnelManager(FileConfigStore(applicationContext))
tunnelManager.onCreate()
asyncWorker.supplyAsync { getBackend() }.thenAccept { futureBackend.complete(it) }
asyncWorker.supplyAsync(Companion::getBackend).thenAccept { futureBackend.complete(it) }
sharedPreferences.registerOnSharedPreferenceChangeListener(this)
}