diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b22e2d350..48da6c079 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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" diff --git a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/AnalyticsConfig.kt b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/AnalyticsConfig.kt index 65f788c31..213464892 100644 --- a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/AnalyticsConfig.kt +++ b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/AnalyticsConfig.kt @@ -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 diff --git a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/CommandersActLabels.kt b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/CommandersActLabels.kt index 21c26689e..23e7afc47 100644 --- a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/CommandersActLabels.kt +++ b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/CommandersActLabels.kt @@ -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"), diff --git a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/MediaEventType.kt b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/MediaEventType.kt index fcb9c108f..582128b14 100644 --- a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/MediaEventType.kt +++ b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/MediaEventType.kt @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.analytics.commandersact /** * CommandersAct [TCMediaEvent] Media event type */ +@Suppress("UndocumentedPublicProperty") enum class MediaEventType { Play, Pause, diff --git a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/TCMediaEvent.kt b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/TCMediaEvent.kt index ddff11827..90508b27c 100644 --- a/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/TCMediaEvent.kt +++ b/pillarbox-analytics/src/main/java/ch/srgssr/pillarbox/analytics/commandersact/TCMediaEvent.kt @@ -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" diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/SRGMediaItemBuilder.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/SRGMediaItemBuilder.kt index 24a1f0520..8fcb08718 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/SRGMediaItemBuilder.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/SRGMediaItemBuilder.kt @@ -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" diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenDataSource.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenDataSource.kt index c6736307e..c3f1f8175 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenDataSource.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenDataSource.kt @@ -52,6 +52,7 @@ class AkamaiTokenDataSource private constructor( } } + @Suppress("UndocumentedPublicClass") companion object { /** * Token Query Param to add to trigger token request diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenProvider.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenProvider.kt index 152552a9f..fb638e181 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenProvider.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/akamai/AkamaiTokenProvider.kt @@ -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? { diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/exception/BlockReasonException.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/exception/BlockReasonException.kt index 03c401479..03bf6d3eb 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/exception/BlockReasonException.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/exception/BlockReasonException.kt @@ -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 { diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/BlockReason.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/BlockReason.kt index ce7c5cc3f..1e7f29cd8 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/BlockReason.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/BlockReason.kt @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.core.business.integrationlayer.data /** * Block reason */ +@Suppress("UndocumentedPublicProperty") enum class BlockReason { GEOBLOCK, LEGAL, diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Drm.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Drm.kt index 05adacd07..f35ba5b8d 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Drm.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Drm.kt @@ -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 } diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/MediaType.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/MediaType.kt index 94e412cb0..56ad60a8d 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/MediaType.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/MediaType.kt @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.core.business.integrationlayer.data /** * The media type */ +@Suppress("UndocumentedPublicProperty") enum class MediaType { AUDIO, VIDEO } diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Resource.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Resource.kt index 30ffcfb32..1144ee331 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Resource.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/Resource.kt @@ -32,6 +32,7 @@ data class Resource( /** * Type of the Resource */ + @Suppress("UndocumentedPublicProperty") enum class Type { PROGRESSIVE, M3UPLAYLIST, HLS, HDS, RTMP, DASH, UNKNOWN } @@ -39,5 +40,6 @@ data class Resource( /** * Token type */ + @Suppress("UndocumentedPublicProperty") enum class TokenType { AKAMAI, NONE } } diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/TimeIntervalType.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/TimeIntervalType.kt index 7992613ed..7fbfdc825 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/TimeIntervalType.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/data/TimeIntervalType.kt @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.core.business.integrationlayer.data /** * Time interval type */ +@Suppress("UndocumentedPublicProperty") enum class TimeIntervalType { CLOSING_CREDITS, OPENING_CREDITS, diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/SRGEventLoggerTracker.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/SRGEventLoggerTracker.kt index e93b4a50c..e98631d62 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/SRGEventLoggerTracker.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/SRGEventLoggerTracker.kt @@ -36,7 +36,7 @@ class SRGEventLoggerTracker : MediaItemTracker { } } - companion object { + private companion object { private const val TAG = "SRGLogger" } } diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/comscore/ComScoreTracker.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/comscore/ComScoreTracker.kt index 6e6011134..9155a9c66 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/comscore/ComScoreTracker.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/tracker/comscore/ComScoreTracker.kt @@ -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 diff --git a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoBrowser.kt b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoBrowser.kt index d62276ee7..c71568fac 100644 --- a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoBrowser.kt +++ b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoBrowser.kt @@ -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" } } diff --git a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoItem.kt b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoItem.kt index d2db206bb..d57eaa88e 100644 --- a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoItem.kt +++ b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/DemoItem.kt @@ -72,6 +72,7 @@ data class DemoItem( } } + @Suppress("UndocumentedPublicClass") companion object { private const val serialVersionUID: Long = 1 diff --git a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/Playlist.kt b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/Playlist.kt index d52aa60b6..e2855a611 100644 --- a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/Playlist.kt +++ b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/data/Playlist.kt @@ -39,6 +39,7 @@ data class Playlist(val title: String, val items: List, val descriptio .build() } + @Suppress("UndocumentedPublicClass") companion object { private const val serialVersionUID: Long = 1 diff --git a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/source/BlockedTimeRangeAssetLoader.kt b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/source/BlockedTimeRangeAssetLoader.kt index 9e86731a6..cc58a6630 100644 --- a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/source/BlockedTimeRangeAssetLoader.kt +++ b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/source/BlockedTimeRangeAssetLoader.kt @@ -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 diff --git a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/ui/integrationLayer/data/ILRepository.kt b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/ui/integrationLayer/data/ILRepository.kt index 8b8a1ea28..da8685db5 100644 --- a/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/ui/integrationLayer/data/ILRepository.kt +++ b/pillarbox-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/ui/integrationLayer/data/ILRepository.kt @@ -215,7 +215,7 @@ class ILRepository( ).flow } - companion object { + private companion object { private const val PAGE_SIZE = 20 } } diff --git a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/ui/player/PlayerActivity.kt b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/ui/player/PlayerActivity.kt index b12940979..f25b62582 100644 --- a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/ui/player/PlayerActivity.kt +++ b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/ui/player/PlayerActivity.kt @@ -70,6 +70,7 @@ class PlayerActivity : ComponentActivity() { player.release() } + @Suppress("UndocumentedPublicClass") companion object { private const val ARG_ITEM = "demo_item" diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaLibraryService.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaLibraryService.kt index 90ed39875..37f2ac9db 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaLibraryService.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaLibraryService.kt @@ -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" diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaSessionService.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaSessionService.kt index efeff0d0d..4ca9f31dc 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaSessionService.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/service/DemoMediaSessionService.kt @@ -54,7 +54,7 @@ class DemoMediaSessionService : PillarboxMediaSessionService() { super.onDestroy() } - companion object { + private companion object { private const val TAG = "BackgroundService" } } diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerActivity.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerActivity.kt index 72e378a3a..d5cc620b6 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerActivity.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerActivity.kt @@ -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" diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerViewModel.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerViewModel.kt index bd88b1ee0..0c8685b63 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerViewModel.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/player/SimplePlayerViewModel.kt @@ -158,7 +158,7 @@ class SimplePlayerViewModel( Log.i(TAG, "onCreditChanged $credit") } - companion object { + private companion object { private const val TAG = "PillarboxDemo" } diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/misc/UpdatableMediaItemViewModel.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/misc/UpdatableMediaItemViewModel.kt index 88dcbc72f..7b86c7595 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/misc/UpdatableMediaItemViewModel.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/misc/UpdatableMediaItemViewModel.kt @@ -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 diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxExoPlayer.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxExoPlayer.kt index 754bbda3d..94691fcfc 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxExoPlayer.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxExoPlayer.kt @@ -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. diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxPlayer.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxPlayer.kt index a3c939793..aa0e91cfe 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxPlayer.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxPlayer.kt @@ -78,6 +78,7 @@ interface PillarboxPlayer : Player { */ var trackingEnabled: Boolean + @Suppress("UndocumentedPublicClass") companion object { /** diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/SeekIncrement.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/SeekIncrement.kt index f5f3d4467..dc0877ffa 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/SeekIncrement.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/SeekIncrement.kt @@ -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 } diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/analytics/PillarboxAnalyticsListener.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/analytics/PillarboxAnalyticsListener.kt index 3c8e86756..caa23c44c 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/analytics/PillarboxAnalyticsListener.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/analytics/PillarboxAnalyticsListener.kt @@ -63,6 +63,7 @@ interface PillarboxAnalyticsListener : AnalyticsListener { */ fun onCreditChanged(eventTime: EventTime, credit: Credit?) {} + @Suppress("UndocumentedPublicClass") companion object { /** * @see [PillarboxPlayer.EVENT_BLOCKED_TIME_RANGE_REACHED] diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/PillarboxData.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/PillarboxData.kt index e926e5c5d..6070250ed 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/PillarboxData.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/PillarboxData.kt @@ -17,6 +17,7 @@ data class PillarboxData( val trackersData: MediaItemTrackerData = MediaItemTrackerData.EMPTY, val blockedTimeRanges: List = emptyList() ) { + @Suppress("UndocumentedPublicClass") companion object { /** * Empty [PillarboxData]. diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/UrlAssetLoader.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/UrlAssetLoader.kt index 95a3aefe2..de73392f6 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/UrlAssetLoader.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/asset/UrlAssetLoader.kt @@ -53,7 +53,7 @@ class UrlAssetLoader( ) } - companion object { + private companion object { private val DEFAULT_TRACKER_DATA_LOADER = TrackerDataProvider { _, _ -> } } } diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/service/PlaybackService.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/service/PlaybackService.kt index cf08a9a17..64b5bb662 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/service/PlaybackService.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/service/PlaybackService.kt @@ -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" } diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaController.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaController.kt index 480ebe6d5..cd189d05e 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaController.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaController.kt @@ -906,7 +906,7 @@ open class PillarboxMediaController internal constructor() : PillarboxPlayer { mediaController.setAudioAttributes(audioAttributes, handleAudioFocus) } - companion object { + private companion object { private const val TAG = "PillarboxMediaController" } } diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaSession.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaSession.kt index 4bbd9e29e..cc2e2fd37 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaSession.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/session/PillarboxMediaSession.kt @@ -310,7 +310,7 @@ open class PillarboxMediaSession internal constructor() { } } - companion object { - internal const val TAG = "PillarboxMediaSession" + private companion object { + private const val TAG = "PillarboxMediaSession" } } diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSource.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSource.kt index 88cae6552..5abdac8e5 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSource.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSource.kt @@ -147,7 +147,7 @@ class PillarboxMediaSource internal constructor( } } - companion object { + private companion object { private const val TAG = "PillarboxMediaSource" } } diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSourceFactory.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSourceFactory.kt index f34b46d83..ce9de8984 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSourceFactory.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/source/PillarboxMediaSourceFactory.kt @@ -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 } } diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTracker.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTracker.kt index 927def4be..21c34522a 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTracker.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTracker.kt @@ -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 } /** diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerData.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerData.kt index 39c6c8746..1fa3231d1 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerData.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerData.kt @@ -73,6 +73,7 @@ class MediaItemTrackerData private constructor(private val map: Map, An return "MediaItemTrackerData(map=$map)" } + @Suppress("UndocumentedPublicClass") companion object { /** * Empty [MediaItemTrackerData]. diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracks/Track.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracks/Track.kt index 6f00baa3b..55c528cda 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracks/Track.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/tracks/Track.kt @@ -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]. diff --git a/pillarbox-ui/src/main/java/ch/srgssr/pillarbox/ui/widget/DelayedVisibilityState.kt b/pillarbox-ui/src/main/java/ch/srgssr/pillarbox/ui/widget/DelayedVisibilityState.kt index e1c7bd937..e2ba04be4 100644 --- a/pillarbox-ui/src/main/java/ch/srgssr/pillarbox/ui/widget/DelayedVisibilityState.kt +++ b/pillarbox-ui/src/main/java/ch/srgssr/pillarbox/ui/widget/DelayedVisibilityState.kt @@ -105,6 +105,7 @@ class DelayedVisibilityState internal constructor( return duration < INFINITE && duration > ZERO } + @Suppress("UndocumentedPublicClass") companion object { /** * Default duration