summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
index 0b3c2ba37caf..4e8afccee40f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
@@ -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,12 +706,14 @@ 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) {
- mPointerView.setAlpha(alpha);
- setAlpha(alpha);
+ if (Flags.enableNewBubbleAnimations()) {
+ setAlpha(alpha);
+ } else {
+ mPointerView.setAlpha(alpha);
+ setAlpha(alpha);
+ }
}
/**