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

Commit 6a9001f5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Separate background & pointer alpha for the expanded view" into main

parents 41f15711 6c3cbb5f
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ import androidx.annotation.Nullable;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.policy.ScreenDecorationsUtils;
import com.android.internal.protolog.common.ProtoLog;
import com.android.wm.shell.Flags;
import com.android.wm.shell.R;
import com.android.wm.shell.common.AlphaOptimizedButton;
import com.android.wm.shell.common.TriangleShape;
@@ -670,6 +671,11 @@ public class BubbleExpandedView extends LinearLayout {
        }
    }

    /** Sets the alpha for the pointer. */
    public void setPointerAlpha(float alpha) {
        mPointerView.setAlpha(alpha);
    }

    /**
     * Get alpha from underlying {@code TaskView} if this view is for a bubble.
     * Or get alpha for the overflow view if this view is for overflow.
@@ -700,13 +706,15 @@ public class BubbleExpandedView extends LinearLayout {
        }
    }

    /**
     * Sets the alpha of the background and the pointer view.
     */
    /** Sets the alpha of the background. */
    public void setBackgroundAlpha(float alpha) {
        if (Flags.enableNewBubbleAnimations()) {
            setAlpha(alpha);
        } else {
            mPointerView.setAlpha(alpha);
            setAlpha(alpha);
        }
    }

    /**
     * Set translation Y for the expanded view content.