Add config flag to enable new media activity.

This commit is contained in:
Alex Hart
2026-08-04 14:31:21 -03:00
parent ebd6c56b6d
commit b2a20fa56e
2 changed files with 21 additions and 1 deletions
@@ -59,7 +59,18 @@ class InternalValues internal constructor(store: KeyValueStore) : SignalStoreVal
*/
var forceSinglePane by booleanValue(FORCE_SINGLE_PANE_ON_ALL_DEVICES, false).falseForExternalUsers()
var useNewMediaActivity by booleanValue(USE_NEW_MEDIA_ACTIVITY, false).falseForExternalUsers()
/**
* Whether to use the new media-send flow. Internal users can override the remote value.
*/
var useNewMediaActivity: Boolean
get() = if (RemoteConfig.internalUser) {
getBoolean(USE_NEW_MEDIA_ACTIVITY, RemoteConfig.useNewMediaSendFlow)
} else {
RemoteConfig.useNewMediaSendFlow
}
set(value) {
putBoolean(USE_NEW_MEDIA_ACTIVITY, value)
}
/**
* Members will not be added directly to a GV2 even if they could be.
@@ -1481,5 +1481,14 @@ object RemoteConfig {
hotSwappable = true
)
/** Whether to utilize the new media-send feature module */
@JvmStatic
@get:JvmName("useNewMediaSendFlow")
val useNewMediaSendFlow: Boolean by remoteBoolean(
key = "android.useNewMediaSendFlow",
defaultValue = false,
hotSwappable = true
)
// endregion
}