Remove feature flag PictureInPicture

This commit is contained in:
Benoit Marty
2024-08-27 18:41:40 +02:00
parent b2907eb955
commit edd0700bf8
2 changed files with 1 additions and 16 deletions

View File

@@ -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
}
}

View File

@@ -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",