[Android] VideosModel: Fix lint warning

Geoffrey Métais git at videolan.org
Mon Sep 3 11:24:30 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Sep  3 11:16:15 2018 +0200| [30dbefff4862c0501bb603fce06a57c99965666c] | committer: Geoffrey Métais

VideosModel: Fix lint warning

> https://code.videolan.org/videolan/vlc-android/commit/30dbefff4862c0501bb603fce06a57c99965666c
---

 vlc-android/src/org/videolan/vlc/viewmodels/VideosModel.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/VideosModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/VideosModel.kt
index 2ee8f0ca9..3d07825b0 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/VideosModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/VideosModel.kt
@@ -97,8 +97,8 @@ open class VideosModel(context: Context, private val group: String?, private val
 
     class Factory(private val context: Context, val group: String?, private val minGroupLen : Int, private val sort : Int, private val desc : Boolean?): ViewModelProvider.NewInstanceFactory() {
         override fun <T : ViewModel> create(modelClass: Class<T>): T {
-            @Suppress("UNCHECKED_CAST")
             val length = if (minGroupLen == 0) Integer.valueOf(Settings.getInstance(context).getString("video_min_group_length", "6")) else minGroupLen
+            @Suppress("UNCHECKED_CAST")
             return VideosModel(context.applicationContext, group, length, sort, desc) as T
         }
     }



More information about the Android mailing list