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

Commit 035badd3 authored by Mady Mellor's avatar Mady Mellor
Browse files

Cherrypick and fix another merge conflict of ag/2163253

Test: manual
Change-Id: I33b8f87e53a3393a2802842ad2196c9d089ec7fc
parent abd3e985
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -86,6 +86,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    private static final int COLORED_DIVIDER_ALPHA = 0x7B;
    private static final int MENU_VIEW_INDEX = 0;

    public interface LayoutListener {
        public void onLayout();
    }

    private LayoutListener mLayoutListener;
    private final NotificationInflater mNotificationInflater;
    private int mIconTransformContentShift;
    private int mIconTransformContentShiftNoIcon;
@@ -1608,6 +1613,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        mIsSystemChildExpanded = expanded;
    }

    public void setLayoutListener(LayoutListener listener) {
        mLayoutListener = listener;
    }

    public void removeListener() {
        mLayoutListener = null;
    }

    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
@@ -1616,6 +1629,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
            mMenuRow.onHeightUpdate();
        }
        updateContentShiftHeight();
        if (mLayoutListener != null) {
            mLayoutListener.onLayout();
        }
    }

    /**
+10 −8
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;

public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnClickListener {
public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnClickListener,
        ExpandableNotificationRow.LayoutListener {

    private static final boolean DEBUG = false;
    private static final String TAG = "swipe";
@@ -167,13 +168,14 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl

    @Override
    public void onConfigurationChanged() {
        mParent.post(new Runnable() {
        mParent.setLayoutListener(this);
    }

    @Override
            public void run() {
    public void onLayout() {
        mIconsPlaced = false; // Force icons to be re-placed
        setMenuLocation();
            }
        });
        mParent.removeListener();
    }

    private void createMenuViews() {