Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +9 −1 Original line number Diff line number Diff line Loading @@ -398,6 +398,14 @@ public class Bubble implements BubbleViewProvider { } } @Override public void setExpandedContentAlpha(float alpha) { if (mExpandedView != null) { mExpandedView.setAlpha(alpha); mExpandedView.setTaskViewAlpha(alpha); } } /** * Set visibility of bubble in the expanded state. * Loading @@ -407,7 +415,7 @@ public class Bubble implements BubbleViewProvider { * and setting {@code false} actually means rendering the expanded view in transparent. */ @Override public void setContentVisibility(boolean visibility) { public void setTaskViewVisibility(boolean visibility) { if (mExpandedView != null) { mExpandedView.setContentVisibility(visibility); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +41 −2 Original line number Diff line number Diff line Loading @@ -85,6 +85,19 @@ public class BubbleExpandedView extends LinearLayout { private boolean mImeVisible; private boolean mNeedsNewHeight; /** * Whether we want the TaskView's content to be visible (alpha = 1f). If * {@link #mIsAlphaAnimating} is true, this may not reflect the TaskView's actual alpha value * until the animation ends. */ private boolean mIsContentVisible = false; /** * Whether we're animating the TaskView's alpha value. If so, we will hold off on applying alpha * changes from {@link #setContentVisibility} until the animation ends. */ private boolean mIsAlphaAnimating = false; private int mMinHeight; private int mOverflowHeight; private int mSettingsIconHeight; Loading Loading @@ -464,6 +477,29 @@ public class BubbleExpandedView extends LinearLayout { } } /** * Whether we are currently animating the TaskView's alpha value. If this is set to true, calls * to {@link #setContentVisibility} will not be applied until this is set to false again. */ void setAlphaAnimating(boolean animating) { mIsAlphaAnimating = animating; // If we're done animating, apply the correct if (!animating) { setContentVisibility(mIsContentVisible); } } /** * Sets the alpha of the underlying TaskView, since changing the expanded view's alpha does not * affect the TaskView since it uses a Surface. */ void setTaskViewAlpha(float alpha) { if (mTaskView != null) { mTaskView.setAlpha(alpha); } } /** * Set visibility of contents in the expanded state. * Loading @@ -477,16 +513,19 @@ public class BubbleExpandedView extends LinearLayout { Log.d(TAG, "setContentVisibility: visibility=" + visibility + " bubble=" + getBubbleKey()); } mIsContentVisible = visibility; final float alpha = visibility ? 1f : 0f; mPointerView.setAlpha(alpha); if (mTaskView != null) { if (mTaskView != null && !mIsAlphaAnimating) { mTaskView.setAlpha(alpha); } } @Nullable View getTaskView() { TaskView getTaskView() { return mTaskView; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt +6 −2 Original line number Diff line number Diff line Loading @@ -167,8 +167,12 @@ class BubbleOverflow( return dotPath } override fun setContentVisibility(visible: Boolean) { expandedView?.setContentVisibility(visible) override fun setExpandedContentAlpha(alpha: Float) { expandedView?.alpha = alpha } override fun setTaskViewVisibility(visible: Boolean) { // Overflow does not have a TaskView. } override fun getIconView(): BadgedImageView? { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +176 −59 File changed.Preview size limit exceeded, changes collapsed. Show changes libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewProvider.java +10 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,16 @@ import androidx.annotation.Nullable; public interface BubbleViewProvider { @Nullable BubbleExpandedView getExpandedView(); void setContentVisibility(boolean visible); /** * Sets the alpha of the expanded view content. This will be applied to both the expanded view * container itself (the manage button, etc.) as well as the TaskView within it. */ void setExpandedContentAlpha(float alpha); /** * Sets whether the contents of the bubble's TaskView should be visible. */ void setTaskViewVisibility(boolean visible); @Nullable View getIconView(); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +9 −1 Original line number Diff line number Diff line Loading @@ -398,6 +398,14 @@ public class Bubble implements BubbleViewProvider { } } @Override public void setExpandedContentAlpha(float alpha) { if (mExpandedView != null) { mExpandedView.setAlpha(alpha); mExpandedView.setTaskViewAlpha(alpha); } } /** * Set visibility of bubble in the expanded state. * Loading @@ -407,7 +415,7 @@ public class Bubble implements BubbleViewProvider { * and setting {@code false} actually means rendering the expanded view in transparent. */ @Override public void setContentVisibility(boolean visibility) { public void setTaskViewVisibility(boolean visibility) { if (mExpandedView != null) { mExpandedView.setContentVisibility(visibility); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +41 −2 Original line number Diff line number Diff line Loading @@ -85,6 +85,19 @@ public class BubbleExpandedView extends LinearLayout { private boolean mImeVisible; private boolean mNeedsNewHeight; /** * Whether we want the TaskView's content to be visible (alpha = 1f). If * {@link #mIsAlphaAnimating} is true, this may not reflect the TaskView's actual alpha value * until the animation ends. */ private boolean mIsContentVisible = false; /** * Whether we're animating the TaskView's alpha value. If so, we will hold off on applying alpha * changes from {@link #setContentVisibility} until the animation ends. */ private boolean mIsAlphaAnimating = false; private int mMinHeight; private int mOverflowHeight; private int mSettingsIconHeight; Loading Loading @@ -464,6 +477,29 @@ public class BubbleExpandedView extends LinearLayout { } } /** * Whether we are currently animating the TaskView's alpha value. If this is set to true, calls * to {@link #setContentVisibility} will not be applied until this is set to false again. */ void setAlphaAnimating(boolean animating) { mIsAlphaAnimating = animating; // If we're done animating, apply the correct if (!animating) { setContentVisibility(mIsContentVisible); } } /** * Sets the alpha of the underlying TaskView, since changing the expanded view's alpha does not * affect the TaskView since it uses a Surface. */ void setTaskViewAlpha(float alpha) { if (mTaskView != null) { mTaskView.setAlpha(alpha); } } /** * Set visibility of contents in the expanded state. * Loading @@ -477,16 +513,19 @@ public class BubbleExpandedView extends LinearLayout { Log.d(TAG, "setContentVisibility: visibility=" + visibility + " bubble=" + getBubbleKey()); } mIsContentVisible = visibility; final float alpha = visibility ? 1f : 0f; mPointerView.setAlpha(alpha); if (mTaskView != null) { if (mTaskView != null && !mIsAlphaAnimating) { mTaskView.setAlpha(alpha); } } @Nullable View getTaskView() { TaskView getTaskView() { return mTaskView; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt +6 −2 Original line number Diff line number Diff line Loading @@ -167,8 +167,12 @@ class BubbleOverflow( return dotPath } override fun setContentVisibility(visible: Boolean) { expandedView?.setContentVisibility(visible) override fun setExpandedContentAlpha(alpha: Float) { expandedView?.alpha = alpha } override fun setTaskViewVisibility(visible: Boolean) { // Overflow does not have a TaskView. } override fun getIconView(): BadgedImageView? { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +176 −59 File changed.Preview size limit exceeded, changes collapsed. Show changes
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewProvider.java +10 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,16 @@ import androidx.annotation.Nullable; public interface BubbleViewProvider { @Nullable BubbleExpandedView getExpandedView(); void setContentVisibility(boolean visible); /** * Sets the alpha of the expanded view content. This will be applied to both the expanded view * container itself (the manage button, etc.) as well as the TaskView within it. */ void setExpandedContentAlpha(float alpha); /** * Sets whether the contents of the bubble's TaskView should be visible. */ void setTaskViewVisibility(boolean visible); @Nullable View getIconView(); Loading