Skip to content

Commit

Permalink
Bump detekt from 1.23.6 to 1.23.7 (#696)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joaquim Stähli <[email protected]>
Co-authored-by: Gaëtan Muller <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2024
1 parent fd46ee1 commit 0c3e690
Show file tree
Hide file tree
Showing 42 changed files with 60 additions and 23 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ androidx-tv-material = "1.0.0"
coil = "2.7.0"
comscore = "6.11.1"
dependency-analysis-gradle-plugin = "2.0.1"
detekt = "1.23.6"
detekt = "1.23.7"
dokka = "1.9.20"
guava = "33.0.0-android"
json = "20240303"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ data class AnalyticsConfig(
/**
* Vendor
*/
@Suppress("UndocumentedPublicProperty")
enum class Vendor {
SRG, SWI, RTS, RSI, SRF, RTR
SRG,
SWI,
RTS,
RSI,
SRF,
RTR
}

@Suppress("UndocumentedPublicClass")
companion object {
/**
* SRG Production CommandersAct source key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package ch.srgssr.pillarbox.analytics.commandersact
*
* @property label the key property
*/
@Suppress("UndocumentedPublicProperty")
enum class CommandersActLabels(val label: String) {
// Event keys
EVENT_VALUE("event_value"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.analytics.commandersact
/**
* CommandersAct [TCMediaEvent] Media event type
*/
@Suppress("UndocumentedPublicProperty")
enum class MediaEventType {
Play,
Pause,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class TCMediaEvent(
put(key, value)
}

companion object {
private companion object {
private const val PLAYER_DISPLAY_NAME = "Pillarbox"
private const val MEDIA_PLAYER_VERSION = "media_player_version"
private const val MEDIA_VOLUME = "media_volume"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class SRGMediaItemBuilder(mediaItem: MediaItem) {
return mediaItemBuilder.build()
}

companion object {
private companion object {
private const val PATH = "integrationlayer/2.1/mediaComposition/byUrn/"
private const val PARAM_ONLY_CHAPTERS = "onlyChapters"
private const val PARAM_VECTOR = "vector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class AkamaiTokenDataSource private constructor(
}
}

@Suppress("UndocumentedPublicClass")
companion object {
/**
* Token Query Param to add to trigger token request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AkamaiTokenProvider(private val httpClient: HttpClient = DefaultHttpClient
@Serializable
internal data class TokenResponse(val token: Token)

companion object {
internal companion object {
private const val TOKEN_SERVICE_URL = "https://tp.srgssr.ch/"

internal fun getAcl(uri: Uri): String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BlockReasonException(val blockReason: BlockReason) : IOException(blockReas
*/
internal constructor(message: String) : this(parseMessage(message))

companion object {
private companion object {
@Suppress("SwallowedException")
private fun parseMessage(message: String): BlockReason {
return try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.core.business.integrationlayer.data
/**
* Block reason
*/
@Suppress("UndocumentedPublicProperty")
enum class BlockReason {
GEOBLOCK,
LEGAL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ data class Drm(val type: Type, val licenseUrl: String, val certificateUrl: Strin
/**
* Drm Type, on Android [FAIRPLAY] is not playable!
*/
@Suppress("UndocumentedPublicProperty")
enum class Type {
FAIRPLAY, WIDEVINE, PLAYREADY
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.core.business.integrationlayer.data
/**
* The media type
*/
@Suppress("UndocumentedPublicProperty")
enum class MediaType {
AUDIO, VIDEO
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ data class Resource(
/**
* Type of the Resource
*/
@Suppress("UndocumentedPublicProperty")
enum class Type {
PROGRESSIVE, M3UPLAYLIST, HLS, HDS, RTMP, DASH, UNKNOWN
}

/**
* Token type
*/
@Suppress("UndocumentedPublicProperty")
enum class TokenType { AKAMAI, NONE }
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.core.business.integrationlayer.data
/**
* Time interval type
*/
@Suppress("UndocumentedPublicProperty")
enum class TimeIntervalType {
CLOSING_CREDITS,
OPENING_CREDITS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SRGEventLoggerTracker : MediaItemTracker {
}
}

companion object {
private companion object {
private const val TAG = "SRGLogger"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class ComScoreTracker internal constructor(
}
}

companion object {
private companion object {
private const val MEDIA_PLAYER_NAME = "Pillarbox"
private const val TAG = "ComScoreTracker"
private const val LIVE_ONLY_WINDOW_OFFSET = 0L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class DemoBrowser {
*/
fun getMediaItemFromId(mediaId: String) = mapMediaIdMediaItem[mediaId]

companion object {
private companion object {
private const val DEMO_BROWSABLE_ROOT = "DEMO_BROWSABLE_ROOT"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ data class DemoItem(
}
}

@Suppress("UndocumentedPublicClass")
companion object {
private const val serialVersionUID: Long = 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ data class Playlist(val title: String, val items: List<DemoItem>, val descriptio
.build()
}

@Suppress("UndocumentedPublicClass")
companion object {
private const val serialVersionUID: Long = 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class BlockedTimeRangeAssetLoader(context: Context) : AssetLoader(DefaultMediaSo
}
}

@Suppress("UndocumentedPublicClass")
companion object {
private val URL = DemoItem.AppleBasic_16_9_TS_HLS.uri
private val videoDuration = 1800.05.seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class ILRepository(
).flow
}

companion object {
private companion object {
private const val PAGE_SIZE = 20
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class PlayerActivity : ComponentActivity() {
player.release()
}

@Suppress("UndocumentedPublicClass")
companion object {
private const val ARG_ITEM = "demo_item"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class DemoMediaLibraryService : PillarboxMediaLibraryService() {
}
}

companion object {
private companion object {
private const val TAG = "MediaLibraryService"
private const val MEDIA_SEARCH_SUPPORTED = "android.media.browse.SEARCH_SUPPORTED"
private const val CONTENT_STYLE_BROWSABLE_HINT = "android.media.browse.CONTENT_STYLE_BROWSABLE_HINT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class DemoMediaSessionService : PillarboxMediaSessionService() {
super.onDestroy()
}

companion object {
private companion object {
private const val TAG = "BackgroundService"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ class SimplePlayerActivity : ComponentActivity(), ServiceConnection {
bindService(intent, this, BIND_AUTO_CREATE)
}

@Suppress("UndocumentedPublicClass")
companion object {
private const val ARG_PLAYLIST = "ARG_PLAYLIST"
private const val ARG_LAYOUT = "ARG_LAYOUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class SimplePlayerViewModel(
Log.i(TAG, "onCreditChanged $credit")
}

companion object {
private companion object {
private const val TAG = "PillarboxDemo"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class UpdatableMediaItemViewModel(application: Application) : AndroidViewModel(a
player.release()
}

companion object {
private companion object {
private const val CHANNEL_ID = "DemoChannel"
private const val NOTIFICATION_ID = 456
private const val EVENT_COUNT = 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ class PillarboxExoPlayer internal constructor(
}
}

@Suppress("UndocumentedPublicClass")
companion object {
/**
* A default maximum position for which a seek to previous will seek to the previous window.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ interface PillarboxPlayer : Player {
*/
var trackingEnabled: Boolean

@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data class SeekIncrement(
require(forward > Duration.ZERO) { "Seek forward increment have to be greater than zero" }
}

companion object {
private companion object {
private val DefaultSeekBackIncrement = C.DEFAULT_SEEK_BACK_INCREMENT_MS.milliseconds
private val DefaultSeekForwardIncrement = C.DEFAULT_SEEK_FORWARD_INCREMENT_MS.milliseconds
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ interface PillarboxAnalyticsListener : AnalyticsListener {
*/
fun onCreditChanged(eventTime: EventTime, credit: Credit?) {}

@Suppress("UndocumentedPublicClass")
companion object {
/**
* @see [PillarboxPlayer.EVENT_BLOCKED_TIME_RANGE_REACHED]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ data class PillarboxData(
val trackersData: MediaItemTrackerData = MediaItemTrackerData.EMPTY,
val blockedTimeRanges: List<BlockedTimeRange> = emptyList()
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Empty [PillarboxData].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class UrlAssetLoader(
)
}

companion object {
private companion object {
private val DEFAULT_TRACKER_DATA_LOADER = TrackerDataProvider { _, _ -> }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ abstract class PlaybackService : Service() {
}
}

companion object {
private companion object {
private const val DEFAULT_NOTIFICATION_ID = 2023
private const val DEFAULT_CHANNEL_ID = "Pillarbox now playing"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ open class PillarboxMediaController internal constructor() : PillarboxPlayer {
mediaController.setAudioAttributes(audioAttributes, handleAudioFocus)
}

companion object {
private companion object {
private const val TAG = "PillarboxMediaController"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ open class PillarboxMediaSession internal constructor() {
}
}

companion object {
internal const val TAG = "PillarboxMediaSession"
private companion object {
private const val TAG = "PillarboxMediaSession"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class PillarboxMediaSource internal constructor(
}
}

companion object {
private companion object {
private const val TAG = "PillarboxMediaSource"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class PillarboxMediaSourceFactory(context: Context) : MediaSource.Factory {
return PillarboxMediaSource(mediaItem = mediaItem, assetLoader = assetLoader, minLiveDvrDurationMs = minLiveDvrDurationMs)
}

companion object {
private companion object {
private const val LIVE_DVR_MIN_DURATION_MS = 60_000L
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ interface MediaItemTracker {
* Stop reason
*/
enum class StopReason {
Stop, EoF

/**
* When the player has been stopped, released or its current media item changes.
*/
Stop,

/**
* When the player reaches the end of the media.
*/
EoF
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class MediaItemTrackerData private constructor(private val map: Map<Class<*>, An
return "MediaItemTrackerData(map=$map)"
}

@Suppress("UndocumentedPublicClass")
companion object {
/**
* Empty [MediaItemTrackerData].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ sealed class Track(
val isSupported: Boolean
get() = group.isTrackSupported(trackIndexInGroup)

@Suppress("UndocumentedPublicClass")
companion object {
/**
* Converts the track at index [trackIndexInGroup] from the provided [group] into a [Track].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class DelayedVisibilityState internal constructor(
return duration < INFINITE && duration > ZERO
}

@Suppress("UndocumentedPublicClass")
companion object {
/**
* Default duration
Expand Down

0 comments on commit 0c3e690

Please sign in to comment.