Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61d69847 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

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
parent 31af7513
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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 ->