summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ibrahim Yilmaz <iyz@google.com> 2023-09-06 10:38:35 +0000
committer Ibrahim Yilmaz <iyz@google.com> 2023-09-20 17:53:00 +0000
commit61d6984773c2ca07ca40b79ca5ae9408f12cb6af (patch)
tree86694bdca6cb65929496945bb687534b23e1920a
parent31af7513962ae0e18b4bd4b44a23da93245bbdcd (diff)
Apply PrecomputedText only ImageFloatingTV and its children
TextView might use different text layout than StaticLayout such as BoringLayout. BoringLayout does not use PrecomputedText and benchmarks show that PrecomputedText(Custom Spannable String) could increase onMeasure time of TextView. That's why we only apply PrecomputedText to ImageFloatingTV and MessagingTextMessage. Bug: 289250881 Test: SystemUITests and perfetto Change-Id: I6fa6bbb9fd8fae855228eeac266d33ce95d99319
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt3
1 files changed, 0 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt
index 96547db1283a..0c4ffe218d37 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt
@@ -19,7 +19,6 @@ package com.android.systemui.statusbar.notification.row
import android.content.Context
import android.util.AttributeSet
import android.view.View
-import android.widget.TextView
import com.android.internal.widget.ConversationLayout
import com.android.internal.widget.ImageFloatingTextView
import com.android.internal.widget.MessagingLayout
@@ -36,8 +35,6 @@ class PrecomputedTextViewFactory @Inject constructor() : NotifRemoteViewsFactory
attrs: AttributeSet
): View? {
return when (name) {
- TextView::class.java.name,
- TextView::class.java.simpleName -> PrecomputedTextView(context, attrs)
ImageFloatingTextView::class.java.name ->
PrecomputedImageFloatingTextView(context, attrs)
MessagingLayout::class.java.name ->