[Android] Fix non-exhaustive when statements

Robert Stone git at videolan.org
Mon May 23 05:09:19 UTC 2022


vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Wed May 18 22:07:03 2022 -0700| [533040a814c68b271824e1d3fbd7b61ce1ca4770] | committer: Nicolas Pomepuy

Fix non-exhaustive when statements

> https://code.videolan.org/videolan/vlc-android/commit/533040a814c68b271824e1d3fbd7b61ce1ca4770
---

 application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt    | 1 +
 application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt       | 3 ++-
 .../src/org/videolan/vlc/gui/audio/AudioPlaylistTipsDelegate.kt        | 1 +
 .../vlc-android/src/org/videolan/vlc/gui/audio/AudioTipsDelegate.kt    | 1 +
 .../src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt          | 1 +
 .../vlc-android/src/org/videolan/vlc/gui/video/VideoTipsDelegate.kt    | 1 +
 6 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
index 68675d4b3..3c0704c5b 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
@@ -232,6 +232,7 @@ class HistoryFragment : MediaBrowserFragment<HistoryModel>(), IRefreshable, IHis
                 if (actionMode != null) onClick(position, item)
                 else onLongClick(position, item)
             }
+            else -> {}
         }
     }
 
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
index 3621f1a00..7061a60cc 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
@@ -79,7 +79,7 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, IDialogManager,
     private lateinit var multiSelectHelper: MultiSelectHelper<MediaWrapper>
     private val historyAdapter: HistoryAdapter = HistoryAdapter(true)
     override fun hasFAB() = false
-    fun getMultiHelper(): MultiSelectHelper<HistoryModel>? = historyAdapter.multiSelectHelper as? MultiSelectHelper<HistoryModel>
+    private fun getMultiHelper(): MultiSelectHelper<HistoryModel>? = historyAdapter.multiSelectHelper as? MultiSelectHelper<HistoryModel>
     private var savedSelection = ArrayList<Int>()
     private val dialogsDelegate = DialogDelegate()
 
@@ -281,6 +281,7 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, IDialogManager,
                     if (actionMode != null) onClick(position, item)
                     else onLongClick(position, item)
                 }
+                else -> {}
             }
         }
     }
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistTipsDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistTipsDelegate.kt
index 4b19c1bac..14be1f98d 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistTipsDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlaylistTipsDelegate.kt
@@ -324,6 +324,7 @@ class AudioPlaylistTipsDelegate(private val activity: AudioPlayerContainerActivi
                 currentAnimations.add(longTapSeek(tapIndicatorRewind, tapIndicatorForward, plTipsTimeline))
                 nextButton.setText(R.string.close)
             }
+            else -> {}
         }
 
         constraintSet.applyTo(audioPlaylistTips)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioTipsDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioTipsDelegate.kt
index 25fce9c18..4328b6f50 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioTipsDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioTipsDelegate.kt
@@ -147,6 +147,7 @@ class AudioTipsDelegate(private val activity: AudioPlayerContainerActivity) {
                 TipsUtils.startTapAnimation(listOf(tapIndicatorStop), true)
                 nextButton.setText(R.string.close)
             }
+            else -> {}
         }
 
         constraintSet.applyTo(audioPlayerTips)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
index 17f8978e0..e98bcb866 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
@@ -97,6 +97,7 @@ class OnboardingActivity : AppCompatActivity(), OnboardingFragmentListener {
             FragmentName.ASK_PERMISSION -> showFragment(if (Permissions.canReadStorage(applicationContext)) FragmentName.SCAN else FragmentName.NO_PERMISSION)
             FragmentName.NO_PERMISSION -> showFragment(if (Permissions.canReadStorage(applicationContext)) FragmentName.SCAN else FragmentName.THEME)
             FragmentName.SCAN -> showFragment(FragmentName.THEME)
+            else -> {}
         }
     }
 
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTipsDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTipsDelegate.kt
index dfc526a6b..fce2b2036 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTipsDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTipsDelegate.kt
@@ -309,6 +309,7 @@ class VideoTipsDelegate(private val player: VideoPlayerActivity) : OnClickListen
                 currentAnimations.add(TipsUtils.horizontalSwipe(tapGestureHorizontal))
                 nextButton.setText(R.string.close)
             }
+            else -> {}
         }
 
         constraintSet.applyTo(overlayTipsLayout)



More information about the Android mailing list