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

Commit efc97e36 authored by Mady Mellor's avatar Mady Mellor Committed by Automerger Merge Worker
Browse files

Merge changes Ie7aaec55,I3053cdb6 into sc-v2-dev am: 57a3e448

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15421004

Change-Id: If1e174c0584c849ca1aa2c758d40fa560c123312
parents 6e96f047 57a3e448
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
    android:layout_width="wrap_content"
    android:layout_height="40dp"
    android:layout_marginTop="8dp"
    android:layout_marginLeft="16dp"
    android:layout_marginBottom="8dp"
    android:focusable="true"
    android:text="@string/manage_bubbles_text"
+15 −15
Original line number Diff line number Diff line
@@ -25,15 +25,15 @@
        android:id="@+id/bubble_manage_menu_dismiss_container"
        android:background="@drawable/bubble_manage_menu_row"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:layout_height="@dimen/bubble_menu_item_height"
        android:gravity="center_vertical"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:paddingStart="@dimen/bubble_menu_padding"
        android:paddingEnd="@dimen/bubble_menu_padding"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_width="@dimen/bubble_menu_icon_size"
            android:layout_height="@dimen/bubble_menu_icon_size"
            android:src="@drawable/ic_remove_no_shadow"
            android:tint="@color/bubbles_icon_tint"/>

@@ -50,15 +50,15 @@
        android:id="@+id/bubble_manage_menu_dont_bubble_container"
        android:background="@drawable/bubble_manage_menu_row"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:layout_height="@dimen/bubble_menu_item_height"
        android:gravity="center_vertical"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:paddingStart="@dimen/bubble_menu_padding"
        android:paddingEnd="@dimen/bubble_menu_padding"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_width="@dimen/bubble_menu_icon_size"
            android:layout_height="@dimen/bubble_menu_icon_size"
            android:src="@drawable/bubble_ic_stop_bubble"
            android:tint="@color/bubbles_icon_tint"/>

@@ -75,16 +75,16 @@
        android:id="@+id/bubble_manage_menu_settings_container"
        android:background="@drawable/bubble_manage_menu_row"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:layout_height="@dimen/bubble_menu_item_height"
        android:gravity="center_vertical"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:paddingStart="@dimen/bubble_menu_padding"
        android:paddingEnd="@dimen/bubble_menu_padding"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/bubble_manage_menu_settings_icon"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_width="@dimen/bubble_menu_icon_size"
            android:layout_height="@dimen/bubble_menu_icon_size"
            android:src="@drawable/ic_remove_no_shadow"/>

        <TextView
+4 −0
Original line number Diff line number Diff line
@@ -152,6 +152,10 @@
    <dimen name="bubble_manage_button_height">56dp</dimen>
    <!-- Height of an item in the bubble manage menu. -->
    <dimen name="bubble_menu_item_height">60dp</dimen>
    <!-- Padding applied to the bubble manage menu. -->
    <dimen name="bubble_menu_padding">16dp</dimen>
    <!-- Size of the icons in the manage menu. -->
    <dimen name="bubble_menu_icon_size">24dp</dimen>
    <!-- Max width of the message bubble-->
    <dimen name="bubble_message_max_width">144dp</dimen>
    <!-- Min width of the message bubble -->
+31 −3
Original line number Diff line number Diff line
@@ -108,9 +108,6 @@ public class BubbleStackView extends FrameLayout
     */
    private static final float FLYOUT_OVERSCROLL_ATTENUATION_FACTOR = 8f;

    /** Duration of the flyout alpha animations. */
    private static final int FLYOUT_ALPHA_ANIMATION_DURATION = 100;

    private static final int FADE_IN_DURATION = 320;

    /** Percent to darken the bubbles when they're in the dismiss target. */
@@ -124,6 +121,8 @@ public class BubbleStackView extends FrameLayout

    private static final int EXPANDED_VIEW_ALPHA_ANIMATION_DURATION = 150;

    private static final int MANAGE_MENU_SCRIM_ANIM_DURATION = 150;

    private static final float SCRIM_ALPHA = 0.6f;

    /**
@@ -200,6 +199,7 @@ public class BubbleStackView extends FrameLayout
    private ExpandedAnimationController mExpandedAnimationController;

    private View mScrim;
    private View mManageMenuScrim;
    private FrameLayout mExpandedViewContainer;

    /** Matrix used to scale the expanded view container with a given pivot point. */
@@ -869,6 +869,14 @@ public class BubbleStackView extends FrameLayout
        addView(mScrim);
        mScrim.setAlpha(0f);

        mManageMenuScrim = new View(getContext());
        mManageMenuScrim.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
        mManageMenuScrim.setBackgroundDrawable(new ColorDrawable(
                getResources().getColor(android.R.color.system_neutral1_1000)));
        addView(mManageMenuScrim, new LayoutParams(MATCH_PARENT, MATCH_PARENT));
        mManageMenuScrim.setAlpha(0f);
        mManageMenuScrim.setVisibility(INVISIBLE);

        mOrientationChangedListener =
                (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
                    mPositioner.update();
@@ -1227,6 +1235,8 @@ public class BubbleStackView extends FrameLayout
        updateExpandedViewTheme();
        mScrim.setBackgroundDrawable(new ColorDrawable(
                getResources().getColor(android.R.color.system_neutral1_1000)));
        mManageMenuScrim.setBackgroundDrawable(new ColorDrawable(
                getResources().getColor(android.R.color.system_neutral1_1000)));
    }

    /**
@@ -2511,6 +2521,24 @@ public class BubbleStackView extends FrameLayout
            return;
        }

        if (show) {
            mManageMenuScrim.setVisibility(VISIBLE);
            mManageMenuScrim.setTranslationZ(mManageMenu.getElevation() - 1f);
        }
        Runnable endAction = () -> {
            if (!show) {
                mManageMenuScrim.setVisibility(INVISIBLE);
                mManageMenuScrim.setTranslationZ(0f);
            }
        };

        mManageMenuScrim.animate()
                .setDuration(MANAGE_MENU_SCRIM_ANIM_DURATION)
                .setInterpolator(show ? ALPHA_IN : ALPHA_OUT)
                .alpha(show ? SCRIM_ALPHA : 0f)
                .withEndAction(endAction)
                .start();

        // If available, update the manage menu's settings option with the expanded bubble's app
        // name and icon.
        if (show && mBubbleData.hasBubbleInStackWithKey(mExpandedBubble.getKey())) {
+3 −5
Original line number Diff line number Diff line
@@ -480,8 +480,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
            boolean relevantState = (mState == ScrimState.UNLOCKED
                    || mState == ScrimState.KEYGUARD
                    || mState == ScrimState.SHADE_LOCKED
                    || mState == ScrimState.PULSING
                    || mState == ScrimState.BUBBLE_EXPANDED);
                    || mState == ScrimState.PULSING);
            if (!(relevantState && mExpansionAffectsAlpha)) {
                return;
            }
@@ -548,8 +547,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
            mQsBottomVisible = qsBottomVisible;
            boolean relevantState = (mState == ScrimState.SHADE_LOCKED
                    || mState == ScrimState.KEYGUARD
                    || mState == ScrimState.PULSING
                    || mState == ScrimState.BUBBLE_EXPANDED);
                    || mState == ScrimState.PULSING);
            if (!(relevantState && mExpansionAffectsAlpha)) {
                return;
            }
@@ -622,7 +620,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
            return;
        }

        if (mState == ScrimState.UNLOCKED || mState == ScrimState.BUBBLE_EXPANDED) {
        if (mState == ScrimState.UNLOCKED) {
            // Darken scrim as you pull down the shade when unlocked, unless the shade is expanding
            // because we're doing the screen off animation.
            if (!mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying()) {
Loading