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

Commit 19c7dd73 authored by Julia Tuttle's avatar Julia Tuttle
Browse files

CallStyle: Handle null icon to glue

Bug: 329288442
Flag: ACONFIG com.android.systemui.new_call_style_action_layout NEXTFOOD
Test: manual
Change-Id: I5e8b1bae7977f53ce8dd977d17231ec44268c486
parent c4c128e9
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -278,11 +278,6 @@ public class EmphasizedNotificationButton extends Button {
        // be ready to glue. This can only happen if the button is initialized and displayed and
        // *then* someone calls glueIcon or glueLabel.

        if (mIconToGlue == null) {
            Log.w(TAG, "glueIconAndLabelIfNeeded: label glued without icon; doing nothing");
            return;
        }

        if (mLabelToGlue == null) {
            Log.w(TAG, "glueIconAndLabelIfNeeded: icon glued without label; doing nothing");
            return;
@@ -318,6 +313,14 @@ public class EmphasizedNotificationButton extends Button {
    private static final String POP_DIRECTIONAL_ISOLATE = "\u2069";

    private void glueIconAndLabel(int layoutDirection) {
        if (mIconToGlue == null) {
            if (DEBUG_NEW_ACTION_LAYOUT) {
                Log.d(TAG, "glueIconAndLabel: null icon, setting text to label");
            }
            setText(mLabelToGlue);
            return;
        }

        final boolean rtlLayout = layoutDirection == LAYOUT_DIRECTION_RTL;

        if (DEBUG_NEW_ACTION_LAYOUT) {