diff options
| author | 2024-04-24 16:26:00 +0000 | |
|---|---|---|
| committer | 2024-04-24 16:26:00 +0000 | |
| commit | 6a9001f53071e6e7d41e32f3e7e424d4e8d7824c (patch) | |
| tree | 7366b23aea9fb5b5abb68ce20651b1c1c5878c06 | |
| parent | 41f1571129cba2e2610a29e72d7dafea7e788b48 (diff) | |
| parent | 6c3cbb5f357e3805290d87043ec42f669cb74f9a (diff) | |
Merge "Separate background & pointer alpha for the expanded view" into main
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java | 18 |
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); + } } /** |