From 782550318a1cceff1b9a3df8c7ceff31f09c94b6 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 21 Apr 2021 16:37:31 +0530 Subject: [PATCH] ui: remove some more non-null assertions on binding fields Signed-off-by: Harsh Shandilya --- .../java/com/wireguard/android/fragment/TunnelDetailFragment.kt | 2 +- .../java/com/wireguard/android/fragment/TunnelListFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.kt index 3ac25201..8d3bbcba 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.kt @@ -43,7 +43,7 @@ class TunnelDetailFragment : BaseFragment() { super.onCreateView(inflater, container, savedInstanceState) binding = TunnelDetailFragmentBinding.inflate(inflater, container, false) binding?.executePendingBindings() - return binding!!.root + return binding?.root } override fun onDestroyView() { 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 6d1c3fee..c76ca6ac 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt @@ -101,7 +101,7 @@ class TunnelListFragment : BaseFragment() { } executePendingBindings() } - return binding!!.root + return binding?.root } override fun onDestroyView() {