From 6cdc4d40018783106a4b3e5ee5cb4744529e7b75 Mon Sep 17 00:00:00 2001 From: rahullohra Date: Wed, 5 Aug 2026 12:14:24 +0530 Subject: [PATCH] chore: remove unused code --- .../io/getstream/video/android/core/Call.kt | 42 ------------------- .../core/call/components/CallMediaManager.kt | 4 ++ 2 files changed, 4 insertions(+), 42 deletions(-) diff --git a/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt b/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt index 65951028d4..a7f20b8fad 100644 --- a/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt +++ b/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt @@ -25,7 +25,6 @@ import androidx.compose.runtime.Stable import io.getstream.android.video.generated.models.AcceptCallResponse import io.getstream.android.video.generated.models.BlockUserResponse import io.getstream.android.video.generated.models.CallSettingsRequest -import io.getstream.android.video.generated.models.CallSettingsResponse import io.getstream.android.video.generated.models.GetCallResponse import io.getstream.android.video.generated.models.GetOrCreateCallResponse import io.getstream.android.video.generated.models.GoLiveResponse @@ -402,8 +401,6 @@ public class Call( */ var audioFilter: InputAudioFilter? = null - // val monitor = CallHealthMonitor(this, scope, onIceRecoveryFailed) - /** * This returns the local microphone volume level. The audio volume is a linear * value between 0 (no sound) and 1 (maximum volume). This is not a raw output - @@ -425,11 +422,6 @@ public class Call( */ val statLatencyHistory: MutableStateFlow> get() = statsReporter.statLatencyHistory - /** - * Call has been left and the object is cleaned up and destroyed. - */ - internal val isDestroyed: Boolean get() = lifecycle.isDestroyed - internal var peerConnectionFactory: StreamPeerConnectionFactory get() = media.peerConnectionFactory set(value) { @@ -447,15 +439,6 @@ public class Call( callSessionId = { sessionId }, ) - /** - * Checks if the audioBitrateProfile has changed since the factory was created, - * and recreates the factory if needed. This should only be called before joining. - * - * If the factory hasn't been created yet, it will be created with the current profile - * when first accessed, so no recreation is needed. - */ - internal fun ensureFactoryMatchesAudioProfile() = media.ensureFactoryMatchesAudioProfile() - internal val clientCapabilities = ConcurrentHashMap().apply { put( ClientCapability.CLIENT_CAPABILITY_SUBSCRIBER_VIDEO_PAUSE.name, @@ -561,31 +544,6 @@ public class Call( callJoinInterceptor, ) - internal fun isPermanentError(error: Any): Boolean = joinCoordinator.isPermanentError(error) - - internal suspend fun _join( - create: Boolean = false, - createOptions: CreateCallOptions? = null, - ring: Boolean = false, - notify: Boolean = false, - hintHighScaleLivestreamPublisher: Boolean? = null, - joinAnalyticsModel: JoinAnalyticsModel, - ): Result = joinCoordinator.joinInternal( - create, - createOptions, - ring, - notify, - hintHighScaleLivestreamPublisher, - joinAnalyticsModel, - ) - - /** Resets the leave guard so a fresh join can run after a previous leave. */ - internal fun resetLeaveGuard() = lifecycle.resetLeaveGuard() - - /** Applies server-provided call settings to the local media manager. */ - internal fun updateMediaManagerFromSettings(callSettings: CallSettingsResponse) = - media.updateMediaManagerFromSettings(callSettings) - internal suspend fun collectStats(): CallStatsReport = statsReporter.collectStats() // region Reconnection — unified loop diff --git a/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/call/components/CallMediaManager.kt b/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/call/components/CallMediaManager.kt index a35fee1836..d3477ff8bb 100644 --- a/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/call/components/CallMediaManager.kt +++ b/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/call/components/CallMediaManager.kt @@ -116,6 +116,9 @@ internal class CallMediaManager( /** * Checks if the audioBitrateProfile has changed since the factory was created, * and recreates the factory if needed. This should only be called before joining. + * + * If the factory hasn't been created yet, it will be created with the current profile + * when first accessed, so no recreation is needed. */ fun ensureFactoryMatchesAudioProfile() { val factory = _peerConnectionFactory @@ -173,6 +176,7 @@ internal class CallMediaManager( // Next access to peerConnectionFactory will recreate it with current profile } + /** Applies server-provided call settings to the local media manager. */ fun updateMediaManagerFromSettings(callSettings: CallSettingsResponse) { val camera = mediaManager.camera val microphone = mediaManager.microphone