Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make enable functions as internal to reduce confusing with setEnable #885

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import kotlinx.coroutines.launch
* Default reaction item data
*
* @param displayText the text visible on the screen.
* @param emojiCode the code of the emoju e.g. ":like:"
* @param emojiCode the code of the emoji e.g. ":like:"
* */
private data class ReactionItemData(val displayText: String, val emojiCode: String)

Expand Down
15 changes: 9 additions & 6 deletions stream-video-android-core/api/stream-video-android-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ public final class io/getstream/video/android/core/CameraManager {
public final fun cleanup ()V
public final fun disable (Z)V
public static synthetic fun disable$default (Lio/getstream/video/android/core/CameraManager;ZILjava/lang/Object;)V
public final fun enable (Z)V
public static synthetic fun enable$default (Lio/getstream/video/android/core/CameraManager;ZILjava/lang/Object;)V
public final fun flip ()V
public final fun getAvailableResolutions ()Lkotlinx/coroutines/flow/StateFlow;
public final fun getDirection ()Lkotlinx/coroutines/flow/StateFlow;
Expand Down Expand Up @@ -337,14 +335,23 @@ public abstract class io/getstream/video/android/core/DeviceStatus {

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

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

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

public final class io/getstream/video/android/core/EventSubscription {
Expand Down Expand Up @@ -433,8 +440,6 @@ public final class io/getstream/video/android/core/MicrophoneManager {
public final fun cleanup ()V
public final fun disable (Z)V
public static synthetic fun disable$default (Lio/getstream/video/android/core/MicrophoneManager;ZILjava/lang/Object;)V
public final fun enable (Z)V
public static synthetic fun enable$default (Lio/getstream/video/android/core/MicrophoneManager;ZILjava/lang/Object;)V
public final fun getDevices ()Lkotlinx/coroutines/flow/StateFlow;
public final fun getMediaManager ()Lio/getstream/video/android/core/MediaManagerImpl;
public final fun getPreferSpeakerphone ()Z
Expand Down Expand Up @@ -699,8 +704,6 @@ public final class io/getstream/video/android/core/SpeakerManager {
public synthetic fun <init> (Lio/getstream/video/android/core/MediaManagerImpl;Lio/getstream/video/android/core/MicrophoneManager;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun disable (Z)V
public static synthetic fun disable$default (Lio/getstream/video/android/core/SpeakerManager;ZILjava/lang/Object;)V
public final fun enable (Z)V
public static synthetic fun enable$default (Lio/getstream/video/android/core/SpeakerManager;ZILjava/lang/Object;)V
public final fun getDevices ()Lkotlinx/coroutines/flow/StateFlow;
public final fun getInitialVolume ()Ljava/lang/Integer;
public final fun getMediaManager ()Lio/getstream/video/android/core/MediaManagerImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ import stream.video.sfu.models.VideoDimension
import java.util.UUID

sealed class DeviceStatus {
object NotSelected : DeviceStatus()
object Disabled : DeviceStatus()
object Enabled : DeviceStatus()
data object NotSelected : DeviceStatus()
data object Disabled : DeviceStatus()
data object Enabled : DeviceStatus()
}

data class CameraDeviceWrapped(
Expand Down Expand Up @@ -95,7 +95,7 @@ class SpeakerManager(

internal var selectedBeforeSpeaker: StreamAudioDevice? = null

fun enable(fromUser: Boolean = true) {
internal fun enable(fromUser: Boolean = true) {
if (fromUser) {
_status.value = DeviceStatus.Enabled
}
Expand Down Expand Up @@ -343,7 +343,7 @@ class MicrophoneManager(

// API
/** Enable the audio, the rtc engine will automatically inform the SFU */
fun enable(fromUser: Boolean = true) {
internal fun enable(fromUser: Boolean = true) {
enforceSetup {
if (fromUser) {
_status.value = DeviceStatus.Enabled
Expand Down Expand Up @@ -518,7 +518,7 @@ public class CameraManager(
return devices
}

fun enable(fromUser: Boolean = true) {
internal fun enable(fromUser: Boolean = true) {
setup()
// 1. update our local state
// 2. update the track enabled status
Expand Down
Loading