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

Commit aa81a2ad authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "Create NotificationOptimizedLinearLayout" into main

parents 7871390d 34f2ac94
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -55,7 +55,9 @@ import java.util.List;
 * A message of a {@link MessagingLayout}.
 */
@RemoteViews.RemoteView
public class MessagingGroup extends LinearLayout implements MessagingLinearLayout.MessagingChild {
public class MessagingGroup extends NotificationOptimizedLinearLayout implements
        MessagingLinearLayout.MessagingChild {

    private static final MessagingPool<MessagingGroup> sInstancePool =
            new MessagingPool<>(10);

+578 −0

File added.

Preview size limit exceeded, changes collapsed.

+3 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ import java.util.ArrayList;
 * MessagingLayouts where groups need to be able to snap it's height to.
 */
@RemoteViews.RemoteView
public class RemeasuringLinearLayout extends LinearLayout {
public class RemeasuringLinearLayout extends NotificationOptimizedLinearLayout {

    private ArrayList<View> mMatchParentViews = new ArrayList<>();

@@ -87,4 +87,5 @@ public class RemeasuringLinearLayout extends LinearLayout {
        mMatchParentViews.clear();
        setMeasuredDimension(getMeasuredWidth(), height);
    }

}
+330 −0

File added.

Preview size limit exceeded, changes collapsed.

+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.statusbar.notification.row

import android.widget.flags.Flags.notifLinearlayoutOptimized
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
import javax.inject.Inject
@@ -31,6 +32,7 @@ constructor(
    precomputedTextViewFactory: PrecomputedTextViewFactory,
    bigPictureLayoutInflaterFactory: BigPictureLayoutInflaterFactory,
    callLayoutSetDataAsyncFactory: CallLayoutSetDataAsyncFactory,
    optimizedLinearLayoutFactory: NotificationOptimizedLinearLayoutFactory
) : NotifRemoteViewsFactoryContainer {
    override val factories: Set<NotifRemoteViewsFactory> = buildSet {
        add(precomputedTextViewFactory)
@@ -40,5 +42,8 @@ constructor(
        if (featureFlags.isEnabled(Flags.CALL_LAYOUT_ASYNC_SET_DATA)) {
            add(callLayoutSetDataAsyncFactory)
        }
        if (notifLinearlayoutOptimized()) {
            add(optimizedLinearLayoutFactory)
        }
    }
}
Loading