From e5a75307c2cf766be85965d96df1bfafc27ada00 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 27 Mar 2023 17:47:09 +0200 Subject: [PATCH] ui: simplify actionmode cast Signed-off-by: Jason A. Donenfeld --- .../java/com/wireguard/android/fragment/TunnelListFragment.kt | 4 +--- 1 file changed, 1 insertion(+), 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() }