Merge "Disable `NewTextRendering1_5` flag for TV Material Text" into androidx-main
diff --git a/tv/tv-material/src/main/java/androidx/tv/material3/Text.kt b/tv/tv-material/src/main/java/androidx/tv/material3/Text.kt
index ac7c7f7..78a455a 100644
--- a/tv/tv-material/src/main/java/androidx/tv/material3/Text.kt
+++ b/tv/tv-material/src/main/java/androidx/tv/material3/Text.kt
@@ -18,6 +18,7 @@
import androidx.compose.foundation.text.BasicText
import androidx.compose.foundation.text.InlineTextContent
+import androidx.compose.foundation.text.NewTextRendering1_5
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.compositionLocalOf
@@ -105,6 +106,10 @@
onTextLayout: (TextLayoutResult) -> Unit = {},
style: TextStyle = LocalTextStyle.current
) {
+ // TODO: Remove this flag if the issue (b/277778635) is fixed or it's deprecated
+ @Suppress("DEPRECATION")
+ NewTextRendering1_5 = false
+
val textColor = color.takeOrElse {
style.color.takeOrElse {
LocalContentColor.current
@@ -206,6 +211,10 @@
onTextLayout: (TextLayoutResult) -> Unit = {},
style: TextStyle = LocalTextStyle.current
) {
+ // TODO: Remove this flag if the issue (b/277778635) is fixed or it's deprecated
+ @Suppress("DEPRECATION")
+ NewTextRendering1_5 = false
+
val textColor = color.takeOrElse {
style.color.takeOrElse {
LocalContentColor.current