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

Commit d34b180a authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Fix notification padding and slice collision" into pi-dev am:...

Merge "Merge "Fix notification padding and slice collision" into pi-dev am: 0719d079" into pi-dev-plus-aosp
parents e4dc31af 2e6cc6a2
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
    private int mIconSize;
    private Consumer<Boolean> mListener;
    private boolean mHasHeader;
    private boolean mHideContent;

    public KeyguardSliceView(Context context) {
        this(context, null, 0);
@@ -192,12 +193,16 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
            }
        }

        final int visibility = mHasHeader || subItemsCount > 0 ? VISIBLE : GONE;
        updateVisibility();
        mListener.accept(mHasHeader);
    }

    private void updateVisibility() {
        final boolean hasContent = mHasHeader || mRow.getChildCount() > 0;
        final int visibility = hasContent && !mHideContent ? VISIBLE : GONE;
        if (visibility != getVisibility()) {
            setVisibility(visibility);
        }

        mListener.accept(mHasHeader);
    }

    /**
@@ -321,6 +326,11 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
        updateTextColors();
    }

    public void setHideContent(boolean hideContent) {
        mHideContent = hideContent;
        updateVisibility();
    }

    /**
     * Representation of an item that appears under the clock on main keyguard message.
     */
+1 −1
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ public class KeyguardStatusView extends GridLayout {

    public void setPulsing(boolean pulsing) {
        mPulsing = pulsing;
        mKeyguardSlice.setVisibility(pulsing ? INVISIBLE : VISIBLE);
        mKeyguardSlice.setHideContent(pulsing);
        onSliceContentChanged(mKeyguardSlice.hasHeader());
        updateDozeVisibleViews();
    }