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

Commit d6fa3a49 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use res value for max bubbles & elevation"

parents b6016681 7095854a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -126,8 +126,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
    static final int DISMISS_GROUP_CANCELLED = 9;
    static final int DISMISS_INVALID_INTENT = 10;

    public static final int MAX_BUBBLES = 5; // TODO: actually enforce this

    private final Context mContext;
    private final NotificationEntryManager mNotificationEntryManager;
    private final BubbleTaskStackListener mTaskStackListener;
+5 −2
Original line number Diff line number Diff line
@@ -181,7 +181,9 @@ public class BubbleStackView extends FrameLayout {
     */
    private float mVerticalPosPercentBeforeRotation = -1;

    private int mMaxBubbles;
    private int mBubbleSize;
    private int mBubbleElevation;
    private int mBubblePaddingTop;
    private int mBubbleTouchPadding;
    private int mExpandedViewPadding;
@@ -326,7 +328,9 @@ public class BubbleStackView extends FrameLayout {
        mInflater = LayoutInflater.from(context);

        Resources res = getResources();
        mMaxBubbles = res.getInteger(R.integer.bubbles_max_rendered);
        mBubbleSize = res.getDimensionPixelSize(R.dimen.individual_bubble_size);
        mBubbleElevation = res.getDimensionPixelSize(R.dimen.bubble_elevation);
        mBubblePaddingTop = res.getDimensionPixelSize(R.dimen.bubble_padding_top);
        mBubbleTouchPadding = res.getDimensionPixelSize(R.dimen.bubble_touch_padding);
        mExpandedAnimateXDistance =
@@ -1597,8 +1601,7 @@ public class BubbleStackView extends FrameLayout {
        for (int i = 0; i < bubbleCount; i++) {
            BubbleView bv = (BubbleView) mBubbleContainer.getChildAt(i);
            bv.updateDotVisibility(true /* animate */);
            bv.setZ((BubbleController.MAX_BUBBLES
                    * getResources().getDimensionPixelSize(R.dimen.bubble_elevation)) - i);
            bv.setZ((mMaxBubbles * mBubbleElevation) - i);
            // If the dot is on the left, and so is the stack, we need to change the dot position.
            if (bv.getDotPositionOnLeft() == mStackOnLeftOrWillBe) {
                bv.setDotPosition(!mStackOnLeftOrWillBe, animate);