Fix some warnings

This commit is contained in:
Maxr1998 authored and Niels van Velzen committed 2022-01-24 08:59:36 +01:00
1 parent b53ac2ce39
commit ade07dbb62
4 files changed
+4 -4

No files matched your search

@@ -123,6 +123,7 @@ class PlayerFragment : Fragment() {
is PlayerException.InvalidPlayOptions -> context.toast(R.string.player_error_invalid_play_options)
is PlayerException.NetworkFailure -> context.toast(R.string.player_error_network_failure)
is PlayerException.UnsupportedContent -> context.toast(R.string.player_error_unsupported_content)
null -> Unit // success
}
}
}
@@ -126,9 +126,9 @@ class PlayerViewModel(application: Application) : AndroidViewModel(application),
val customPrefs = displayPreferencesDto.customPrefs
displayPreferences = DisplayPreferences(
skipBackLength = customPrefs?.get(Constants.DISPLAY_PREFERENCES_SKIP_BACK_LENGTH)?.toLongOrNull()
skipBackLength = customPrefs[Constants.DISPLAY_PREFERENCES_SKIP_BACK_LENGTH]?.toLongOrNull()
?: Constants.DEFAULT_SEEK_TIME_MS,
skipForwardLength = customPrefs?.get(Constants.DISPLAY_PREFERENCES_SKIP_FORWARD_LENGTH)?.toLongOrNull()
skipForwardLength = customPrefs[Constants.DISPLAY_PREFERENCES_SKIP_FORWARD_LENGTH]?.toLongOrNull()
?: Constants.DEFAULT_SEEK_TIME_MS
)
} catch (e: ApiClientException) {
@@ -89,5 +89,5 @@ fun Player.seekToOffset(offsetMs: Long) {
}
fun Player.logTracks(analyticsCollector: AnalyticsCollector) {
analyticsCollector.onTracksChanged(currentTrackGroups, currentTrackSelections)
analyticsCollector.onTracksInfoChanged(currentTracksInfo)
}
@@ -4,7 +4,6 @@ import com.google.android.exoplayer2.C
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector
import com.google.android.exoplayer2.trackselection.MappingTrackSelector
/**
* Get the index of the first renderer of the specified [type] supporting the track with the specified [groupIndex].
*