Skip to content

Commit e5a7530

Browse files
committed
ui: simplify actionmode cast
Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 4fcb8c4 commit e5a7530

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ import kotlinx.coroutines.SupervisorJob
3939
import kotlinx.coroutines.async
4040
import kotlinx.coroutines.awaitAll
4141
import kotlinx.coroutines.launch
42-
import java.util.ArrayList
43-
import java.util.HashSet
4442

4543
/**
4644
* Fragment containing a list of known WireGuard tunnels. It allows creating and deleting tunnels.
@@ -270,7 +268,7 @@ class TunnelListFragment : BaseFragment() {
270268
}
271269
val adapter = if (binding == null) null else binding!!.tunnelList.adapter
272270
if (actionMode == null && !checkedItems.isEmpty() && activity != null) {
273-
(activity as AppCompatActivity?)!!.startSupportActionMode(this)
271+
(activity as AppCompatActivity).startSupportActionMode(this)
274272
} else if (actionMode != null && checkedItems.isEmpty()) {
275273
actionMode!!.finish()
276274
}

0 commit comments

Comments
 (0)