Remove feature flag PictureInPicture
This commit is contained in:
@@ -24,9 +24,6 @@ import com.squareup.anvil.annotations.ContributesBinding
|
||||
import io.element.android.libraries.core.bool.orFalse
|
||||
import io.element.android.libraries.di.AppScope
|
||||
import io.element.android.libraries.di.ApplicationContext
|
||||
import io.element.android.libraries.featureflag.api.FeatureFlagService
|
||||
import io.element.android.libraries.featureflag.api.FeatureFlags
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import javax.inject.Inject
|
||||
|
||||
interface PipSupportProvider {
|
||||
@@ -37,15 +34,10 @@ interface PipSupportProvider {
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultPipSupportProvider @Inject constructor(
|
||||
@ApplicationContext private val context: Context,
|
||||
private val featureFlagService: FeatureFlagService,
|
||||
) : PipSupportProvider {
|
||||
override fun isPipSupported(): Boolean {
|
||||
val isSupportedByTheOs = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
||||
context.packageManager?.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE).orFalse()
|
||||
return if (isSupportedByTheOs) {
|
||||
runBlocking { featureFlagService.isFeatureEnabled(FeatureFlags.PictureInPicture) }
|
||||
} else {
|
||||
false
|
||||
}
|
||||
return isSupportedByTheOs
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,13 +120,6 @@ enum class FeatureFlags(
|
||||
defaultValue = { true },
|
||||
isFinished = false,
|
||||
),
|
||||
PictureInPicture(
|
||||
key = "feature.pictureInPicture",
|
||||
title = "Picture in Picture for Calls",
|
||||
description = "Allow the Call to be rendered in PiP mode",
|
||||
defaultValue = { it.buildType != BuildType.RELEASE },
|
||||
isFinished = false,
|
||||
),
|
||||
PinnedEvents(
|
||||
key = "feature.pinnedEvents",
|
||||
title = "Pinned Events",
|
||||
|
||||
Reference in New Issue
Block a user