Skip to content

Commit 3c2dcd3

Browse files
authored
Make enable functions as internal to reduce confusing with setEnable (#885)
1 parent 3820a06 commit 3c2dcd3

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

dogfooding/src/main/kotlin/io/getstream/video/android/ui/call/ReactionsMenu.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import kotlinx.coroutines.launch
5353
* Default reaction item data
5454
*
5555
* @param displayText the text visible on the screen.
56-
* @param emojiCode the code of the emoju e.g. ":like:"
56+
* @param emojiCode the code of the emoji e.g. ":like:"
5757
* */
5858
private data class ReactionItemData(val displayText: String, val emojiCode: String)
5959

stream-video-android-core/api/stream-video-android-core.api

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ public final class io/getstream/video/android/core/CameraManager {
226226
public final fun cleanup ()V
227227
public final fun disable (Z)V
228228
public static synthetic fun disable$default (Lio/getstream/video/android/core/CameraManager;ZILjava/lang/Object;)V
229-
public final fun enable (Z)V
230-
public static synthetic fun enable$default (Lio/getstream/video/android/core/CameraManager;ZILjava/lang/Object;)V
231229
public final fun flip ()V
232230
public final fun getAvailableResolutions ()Lkotlinx/coroutines/flow/StateFlow;
233231
public final fun getDirection ()Lkotlinx/coroutines/flow/StateFlow;
@@ -337,14 +335,23 @@ public abstract class io/getstream/video/android/core/DeviceStatus {
337335

338336
public final class io/getstream/video/android/core/DeviceStatus$Disabled : io/getstream/video/android/core/DeviceStatus {
339337
public static final field INSTANCE Lio/getstream/video/android/core/DeviceStatus$Disabled;
338+
public fun equals (Ljava/lang/Object;)Z
339+
public fun hashCode ()I
340+
public fun toString ()Ljava/lang/String;
340341
}
341342

342343
public final class io/getstream/video/android/core/DeviceStatus$Enabled : io/getstream/video/android/core/DeviceStatus {
343344
public static final field INSTANCE Lio/getstream/video/android/core/DeviceStatus$Enabled;
345+
public fun equals (Ljava/lang/Object;)Z
346+
public fun hashCode ()I
347+
public fun toString ()Ljava/lang/String;
344348
}
345349

346350
public final class io/getstream/video/android/core/DeviceStatus$NotSelected : io/getstream/video/android/core/DeviceStatus {
347351
public static final field INSTANCE Lio/getstream/video/android/core/DeviceStatus$NotSelected;
352+
public fun equals (Ljava/lang/Object;)Z
353+
public fun hashCode ()I
354+
public fun toString ()Ljava/lang/String;
348355
}
349356

350357
public final class io/getstream/video/android/core/EventSubscription {
@@ -433,8 +440,6 @@ public final class io/getstream/video/android/core/MicrophoneManager {
433440
public final fun cleanup ()V
434441
public final fun disable (Z)V
435442
public static synthetic fun disable$default (Lio/getstream/video/android/core/MicrophoneManager;ZILjava/lang/Object;)V
436-
public final fun enable (Z)V
437-
public static synthetic fun enable$default (Lio/getstream/video/android/core/MicrophoneManager;ZILjava/lang/Object;)V
438443
public final fun getDevices ()Lkotlinx/coroutines/flow/StateFlow;
439444
public final fun getMediaManager ()Lio/getstream/video/android/core/MediaManagerImpl;
440445
public final fun getPreferSpeakerphone ()Z
@@ -699,8 +704,6 @@ public final class io/getstream/video/android/core/SpeakerManager {
699704
public synthetic fun <init> (Lio/getstream/video/android/core/MediaManagerImpl;Lio/getstream/video/android/core/MicrophoneManager;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
700705
public final fun disable (Z)V
701706
public static synthetic fun disable$default (Lio/getstream/video/android/core/SpeakerManager;ZILjava/lang/Object;)V
702-
public final fun enable (Z)V
703-
public static synthetic fun enable$default (Lio/getstream/video/android/core/SpeakerManager;ZILjava/lang/Object;)V
704707
public final fun getDevices ()Lkotlinx/coroutines/flow/StateFlow;
705708
public final fun getInitialVolume ()Ljava/lang/Integer;
706709
public final fun getMediaManager ()Lio/getstream/video/android/core/MediaManagerImpl;

stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/MediaManager.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ import stream.video.sfu.models.VideoDimension
5454
import java.util.UUID
5555

5656
sealed class DeviceStatus {
57-
object NotSelected : DeviceStatus()
58-
object Disabled : DeviceStatus()
59-
object Enabled : DeviceStatus()
57+
data object NotSelected : DeviceStatus()
58+
data object Disabled : DeviceStatus()
59+
data object Enabled : DeviceStatus()
6060
}
6161

6262
data class CameraDeviceWrapped(
@@ -95,7 +95,7 @@ class SpeakerManager(
9595

9696
internal var selectedBeforeSpeaker: StreamAudioDevice? = null
9797

98-
fun enable(fromUser: Boolean = true) {
98+
internal fun enable(fromUser: Boolean = true) {
9999
if (fromUser) {
100100
_status.value = DeviceStatus.Enabled
101101
}
@@ -343,7 +343,7 @@ class MicrophoneManager(
343343

344344
// API
345345
/** Enable the audio, the rtc engine will automatically inform the SFU */
346-
fun enable(fromUser: Boolean = true) {
346+
internal fun enable(fromUser: Boolean = true) {
347347
enforceSetup {
348348
if (fromUser) {
349349
_status.value = DeviceStatus.Enabled
@@ -518,7 +518,7 @@ public class CameraManager(
518518
return devices
519519
}
520520

521-
fun enable(fromUser: Boolean = true) {
521+
internal fun enable(fromUser: Boolean = true) {
522522
setup()
523523
// 1. update our local state
524524
// 2. update the track enabled status

0 commit comments

Comments
 (0)