summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-09-23 17:21:27 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-09-23 17:56:37 +0200
commit05511d49007a54e47251130300b662bf411542b6 (patch)
tree08868d16310bc699105b0c2771e5872d7bf5430f /ui/src/main/java
parent15da17b5952a76a52089a5d7b503e60b43a7ca50 (diff)
ui: cleanup code after churn
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt17
-rw-r--r--ui/src/main/java/com/wireguard/android/util/Extensions.kt1
2 files changed, 2 insertions, 16 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
index 66b0e8ba..a2eacd0b 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
@@ -6,9 +6,7 @@ package com.wireguard.android.fragment
import android.content.Intent
import android.content.res.Resources
-import android.net.Uri
import android.os.Bundle
-import android.provider.OpenableColumns
import android.util.Log
import android.view.LayoutInflater
import android.view.Menu
@@ -29,28 +27,16 @@ import com.wireguard.android.activity.TunnelCreatorActivity
import com.wireguard.android.databinding.ObservableKeyedRecyclerViewAdapter.RowConfigurationHandler
import com.wireguard.android.databinding.TunnelListFragmentBinding
import com.wireguard.android.databinding.TunnelListItemBinding
-import com.wireguard.android.fragment.ConfigNamingDialogFragment.Companion.newInstance
import com.wireguard.android.model.ObservableTunnel
import com.wireguard.android.util.ErrorMessages
import com.wireguard.android.util.TunnelImporter
import com.wireguard.android.widget.MultiselectableRelativeLayout
-import com.wireguard.config.Config
-import kotlinx.coroutines.Deferred
-import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.launch
-import kotlinx.coroutines.withContext
-import java.io.BufferedReader
-import java.io.ByteArrayInputStream
-import java.io.InputStreamReader
-import java.nio.charset.StandardCharsets
import java.util.ArrayList
import java.util.HashSet
-import java.util.Locale
-import java.util.zip.ZipEntry
-import java.util.zip.ZipInputStream
/**
* Fragment containing a list of known WireGuard tunnels. It allows creating and deleting tunnels.
@@ -67,7 +53,8 @@ class TunnelListFragment : BaseFragment() {
}
private val qrImportResultLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
- val qrCode = IntentIntegrator.parseActivityResult(result.resultCode, result.data)?.contents ?: return@registerForActivityResult
+ val qrCode = IntentIntegrator.parseActivityResult(result.resultCode, result.data)?.contents
+ ?: return@registerForActivityResult
lifecycleScope.launch { TunnelImporter.importTunnel(parentFragmentManager, qrCode) { showSnackbar(it) } }
}
diff --git a/ui/src/main/java/com/wireguard/android/util/Extensions.kt b/ui/src/main/java/com/wireguard/android/util/Extensions.kt
index 62bda7e9..2d0899c2 100644
--- a/ui/src/main/java/com/wireguard/android/util/Extensions.kt
+++ b/ui/src/main/java/com/wireguard/android/util/Extensions.kt
@@ -11,7 +11,6 @@ import androidx.annotation.AttrRes
import androidx.lifecycle.lifecycleScope
import androidx.preference.Preference
import com.wireguard.android.Application
-import com.wireguard.android.R
import com.wireguard.android.activity.SettingsActivity
import kotlinx.coroutines.CoroutineScope