summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java/com/wireguard/android/fragment
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-26 23:21:54 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-26 23:21:54 -0600
commit37949ba1ec44bcc9051075cf553cd92df203dff3 (patch)
tree6045d4ed83e3ab5b39de7c895c35a3dd0dd9202c /ui/src/main/java/com/wireguard/android/fragment
parentb2bbaf050cf4aa9bd8a3824afde5fb4ff675c9a4 (diff)
TunnelManager: convert to kotlin
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java/com/wireguard/android/fragment')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
index a6139933..9a92b7cb 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
@@ -125,13 +125,11 @@ class TunnelEditorFragment : BaseFragment(), AppExclusionListener {
tunnel == null -> {
Log.d(TAG, "Attempting to create new tunnel " + binding!!.name)
val manager = Application.getTunnelManager()
- manager.create(binding!!.name!!, newConfig)
- .whenComplete(this::onTunnelCreated)
+ manager.create(binding!!.name!!, newConfig).whenComplete(this::onTunnelCreated)
}
tunnel!!.name != binding!!.name -> {
Log.d(TAG, "Attempting to rename tunnel to " + binding!!.name)
- tunnel!!.setNameAsync(binding!!.name!!)
- .whenComplete { _, t -> onTunnelRenamed(tunnel!!, newConfig, t) }
+ tunnel!!.setNameAsync(binding!!.name!!).whenComplete { _, t -> onTunnelRenamed(tunnel!!, newConfig, t) }
}
else -> {
Log.d(TAG, "Attempting to save config of " + tunnel!!.name)