Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +41 −27 Original line number Diff line number Diff line Loading @@ -482,11 +482,19 @@ public class BubbleExpandedView extends LinearLayout { mPointerWidth, mPointerHeight, true /* pointLeft */)); mRightPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, false /* pointLeft */)); if (mPointerView != null) { updatePointerView(); updatePointerViewIfExists(); updateManageButtonIfExists(); } if (mManageButton != null) { /** * Reinflate manage button if {@link #mManageButton} is initialized. * Does nothing otherwise. */ private void updateManageButtonIfExists() { if (mManageButton == null) { return; } int visibility = mManageButton.getVisibility(); removeView(mManageButton); ContextThemeWrapper ctw = new ContextThemeWrapper(getContext(), Loading @@ -507,7 +515,6 @@ public class BubbleExpandedView extends LinearLayout { setTouchDelegate(new TouchDelegate(r, mManageButton)); }); } } void updateFontSize() { final float fontSize = mContext.getResources() Loading Loading @@ -548,11 +555,18 @@ public class BubbleExpandedView extends LinearLayout { if (mTaskView != null) { mTaskView.setCornerRadius(mCornerRadius); } updatePointerView(); updatePointerViewIfExists(); updateManageButtonIfExists(); } /** Updates the size and visuals of the pointer. **/ private void updatePointerView() { /** * Updates the size and visuals of the pointer if {@link #mPointerView} is initialized. * Does nothing otherwise. */ private void updatePointerViewIfExists() { if (mPointerView == null) { return; } LayoutParams lp = (LayoutParams) mPointerView.getLayoutParams(); if (mCurrentPointer == mLeftPointer || mCurrentPointer == mRightPointer) { lp.width = mPointerHeight; Loading Loading @@ -1055,7 +1069,7 @@ public class BubbleExpandedView extends LinearLayout { // Post because we need the width of the view post(() -> { mCurrentPointer = showVertically ? onLeft ? mLeftPointer : mRightPointer : mTopPointer; updatePointerView(); updatePointerViewIfExists(); if (showVertically) { mPointerPos.y = bubbleCenter - (mPointerWidth / 2f); if (!isRtl) { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +41 −27 Original line number Diff line number Diff line Loading @@ -482,11 +482,19 @@ public class BubbleExpandedView extends LinearLayout { mPointerWidth, mPointerHeight, true /* pointLeft */)); mRightPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, false /* pointLeft */)); if (mPointerView != null) { updatePointerView(); updatePointerViewIfExists(); updateManageButtonIfExists(); } if (mManageButton != null) { /** * Reinflate manage button if {@link #mManageButton} is initialized. * Does nothing otherwise. */ private void updateManageButtonIfExists() { if (mManageButton == null) { return; } int visibility = mManageButton.getVisibility(); removeView(mManageButton); ContextThemeWrapper ctw = new ContextThemeWrapper(getContext(), Loading @@ -507,7 +515,6 @@ public class BubbleExpandedView extends LinearLayout { setTouchDelegate(new TouchDelegate(r, mManageButton)); }); } } void updateFontSize() { final float fontSize = mContext.getResources() Loading Loading @@ -548,11 +555,18 @@ public class BubbleExpandedView extends LinearLayout { if (mTaskView != null) { mTaskView.setCornerRadius(mCornerRadius); } updatePointerView(); updatePointerViewIfExists(); updateManageButtonIfExists(); } /** Updates the size and visuals of the pointer. **/ private void updatePointerView() { /** * Updates the size and visuals of the pointer if {@link #mPointerView} is initialized. * Does nothing otherwise. */ private void updatePointerViewIfExists() { if (mPointerView == null) { return; } LayoutParams lp = (LayoutParams) mPointerView.getLayoutParams(); if (mCurrentPointer == mLeftPointer || mCurrentPointer == mRightPointer) { lp.width = mPointerHeight; Loading Loading @@ -1055,7 +1069,7 @@ public class BubbleExpandedView extends LinearLayout { // Post because we need the width of the view post(() -> { mCurrentPointer = showVertically ? onLeft ? mLeftPointer : mRightPointer : mTopPointer; updatePointerView(); updatePointerViewIfExists(); if (showVertically) { mPointerPos.y = bubbleCenter - (mPointerWidth / 2f); if (!isRtl) { Loading