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

Commit 3e22a258 authored by Josh Tsuji's avatar Josh Tsuji Committed by Android (Google) Code Review
Browse files

Merge "Use a constant value (derived from MAX_BUBBLES) for elevation."

parents ec90ac52 25a4b7b4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1023,8 +1023,8 @@
    <dimen name="ongoing_appops_chip_bg_corner_radius">16dp</dimen>


    <!-- How much a bubble is elevated -->
    <dimen name="bubble_elevation">8dp</dimen>
    <!-- How much each bubble is elevated. -->
    <dimen name="bubble_elevation">1dp</dimen>
    <!-- Padding around a collapsed bubble -->
    <dimen name="bubble_view_padding">0dp</dimen>
    <!-- Padding between bubbles when displayed in expanded state -->
+2 −2
Original line number Diff line number Diff line
@@ -80,8 +80,6 @@ public class BubbleController implements BubbleExpandedView.OnBubbleBlockedListe

    private static final String TAG = "BubbleController";

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

    @Retention(SOURCE)
    @IntDef({DISMISS_USER_GESTURE, DISMISS_AGED, DISMISS_TASK_FINISHED, DISMISS_BLOCKED,
            DISMISS_NOTIF_CANCEL, DISMISS_ACCESSIBILITY_ACTION})
@@ -94,6 +92,8 @@ public class BubbleController implements BubbleExpandedView.OnBubbleBlockedListe
    static final int DISMISS_NOTIF_CANCEL = 5;
    static final int DISMISS_ACCESSIBILITY_ACTION = 6;

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

    // Enables some subset of notifs to automatically become bubbles
    private static final boolean DEBUG_ENABLE_AUTO_BUBBLE = false;

+2 −1
Original line number Diff line number Diff line
@@ -873,7 +873,8 @@ public class BubbleStackView extends FrameLayout {
        for (int i = 0; i < bubbsCount; i++) {
            BubbleView bv = (BubbleView) mBubbleContainer.getChildAt(i);
            bv.updateDotVisibility();
            bv.setZ(bubbsCount - i);
            bv.setZ((BubbleController.MAX_BUBBLES
                    * getResources().getDimensionPixelSize(R.dimen.bubble_elevation)) - i);

            // Draw the shadow around the circle inscribed within the bubble's bounds. This
            // (intentionally) does not draw a shadow behind the update dot, which should be drawing