summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-03-27 17:47:09 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2023-03-27 17:47:09 +0200
commite5a75307c2cf766be85965d96df1bfafc27ada00 (patch)
treea3acc037c9dac0c067a2d5f82bf09c1ffe5dc9ca /ui/src/main/java
parent4fcb8c47923a6ef76d606ca03aebf2a8531136fa (diff)
ui: simplify actionmode cast
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.kt4
1 files changed, 1 insertions, 3 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 53098eb8..8928fb21 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
@@ -39,8 +39,6 @@ import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.launch
-import java.util.ArrayList
-import java.util.HashSet
/**
* Fragment containing a list of known WireGuard tunnels. It allows creating and deleting tunnels.
@@ -270,7 +268,7 @@ class TunnelListFragment : BaseFragment() {
}
val adapter = if (binding == null) null else binding!!.tunnelList.adapter
if (actionMode == null && !checkedItems.isEmpty() && activity != null) {
- (activity as AppCompatActivity?)!!.startSupportActionMode(this)
+ (activity as AppCompatActivity).startSupportActionMode(this)
} else if (actionMode != null && checkedItems.isEmpty()) {
actionMode!!.finish()
}