Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +5 −1 Original line number Diff line number Diff line Loading @@ -1351,8 +1351,12 @@ public class BubbleController implements ConfigurationChangeListener, @Override public void onConfigurationChanged(Configuration newConfig) { DeviceConfig deviceConfig = DeviceConfig.create(mContext, mWindowManager); if (mBubblePositioner != null) { mBubblePositioner.update(DeviceConfig.create(mContext, mWindowManager)); mBubblePositioner.update(deviceConfig); } if (mLayerView != null) { mLayerView.update(deviceConfig); } if (mStackView != null && newConfig != null) { if (newConfig.densityDpi != mDensityDpi Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java +2 −6 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_ import static com.android.wm.shell.shared.animation.Interpolators.EMPHASIZED; import static com.android.wm.shell.shared.animation.Interpolators.EMPHASIZED_DECELERATE; import static java.lang.Math.max; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; Loading Loading @@ -238,7 +236,7 @@ public class BubbleBarAnimationHelper { }) .withEndActions(() -> { bbev.setAnimationMatrix(null); bbev.updateBottomClip(0); bbev.onImeTopChanged(0); if (endRunnable != null) { endRunnable.run(); } Loading Loading @@ -664,9 +662,7 @@ public class BubbleBarAnimationHelper { Log.w(TAG, "Bubble bar expanded view was null when IME top changed"); return; } int bbevBottom = bbev.getContentBottomOnScreen(); int clip = max(bbevBottom - imeTop, 0); bbev.updateBottomClip(clip); bbev.onImeTopChanged(imeTop); } private @Nullable BubbleBarExpandedView getExpandedView() { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java +13 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_NOISY; import static java.lang.Math.max; import android.annotation.Nullable; import android.content.Context; import android.graphics.Insets; Loading Loading @@ -170,6 +172,7 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView private boolean mIsClipping = false; private int mBottomClip = 0; private int mImeTop = 0; /** An enum value that tracks the visibility state of the task view */ private enum TaskViewVisibilityState { Loading Loading @@ -696,12 +699,19 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView return mTempBounds.bottom; } /** Update the amount by which to clip the expanded view at the bottom. */ public void updateBottomClip(int bottomClip) { mBottomClip = bottomClip; /** Notifies the expanded view that the IME top changed. */ public void onImeTopChanged(int imeTop) { mImeTop = imeTop; mBottomClip = max(getContentBottomOnScreen() - mImeTop, 0); onClipUpdate(); } void updateBottomClip() { if (mIsClipping) { onImeTopChanged(mImeTop); } } private void onClipUpdate() { if (mBottomClip == 0) { if (mIsClipping) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java +12 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.wm.shell.shared.bubbles.BubbleConstants.BUBBLE_EXPANDE import android.annotation.Nullable; import android.content.Context; import android.graphics.Insets; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; Loading Loading @@ -106,6 +107,7 @@ public class BubbleBarLayerView extends FrameLayout // Used to ensure touch target size for the menu shown on a bubble expanded view private TouchDelegate mHandleTouchDelegate; private final Rect mHandleTouchBounds = new Rect(); private Insets mInsets; public BubbleBarLayerView(Context context, BubbleController controller, BubbleData bubbleData, BubbleLogger bubbleLogger) { Loading Loading @@ -612,6 +614,7 @@ public class BubbleBarLayerView extends FrameLayout mExpandedView.setX(mTempRect.left); mExpandedView.setY(mTempRect.top); mExpandedView.updateLocation(); mExpandedView.updateBottomClip(); } private void showScrim(boolean show) { Loading Loading @@ -664,6 +667,15 @@ public class BubbleBarLayerView extends FrameLayout return mDragController; } /** Notifies view of device config update. */ public void update(DeviceConfig deviceConfig) { Insets newInsets = deviceConfig.getInsets(); if (!newInsets.equals(mInsets)) { mInsets = newInsets; updateExpandedView(); } } private class LocationChangeListener implements BaseBubblePinController.LocationChangeListener { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +5 −1 Original line number Diff line number Diff line Loading @@ -1351,8 +1351,12 @@ public class BubbleController implements ConfigurationChangeListener, @Override public void onConfigurationChanged(Configuration newConfig) { DeviceConfig deviceConfig = DeviceConfig.create(mContext, mWindowManager); if (mBubblePositioner != null) { mBubblePositioner.update(DeviceConfig.create(mContext, mWindowManager)); mBubblePositioner.update(deviceConfig); } if (mLayerView != null) { mLayerView.update(deviceConfig); } if (mStackView != null && newConfig != null) { if (newConfig.densityDpi != mDensityDpi Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java +2 −6 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_ import static com.android.wm.shell.shared.animation.Interpolators.EMPHASIZED; import static com.android.wm.shell.shared.animation.Interpolators.EMPHASIZED_DECELERATE; import static java.lang.Math.max; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; Loading Loading @@ -238,7 +236,7 @@ public class BubbleBarAnimationHelper { }) .withEndActions(() -> { bbev.setAnimationMatrix(null); bbev.updateBottomClip(0); bbev.onImeTopChanged(0); if (endRunnable != null) { endRunnable.run(); } Loading Loading @@ -664,9 +662,7 @@ public class BubbleBarAnimationHelper { Log.w(TAG, "Bubble bar expanded view was null when IME top changed"); return; } int bbevBottom = bbev.getContentBottomOnScreen(); int clip = max(bbevBottom - imeTop, 0); bbev.updateBottomClip(clip); bbev.onImeTopChanged(imeTop); } private @Nullable BubbleBarExpandedView getExpandedView() { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java +13 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_NOISY; import static java.lang.Math.max; import android.annotation.Nullable; import android.content.Context; import android.graphics.Insets; Loading Loading @@ -170,6 +172,7 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView private boolean mIsClipping = false; private int mBottomClip = 0; private int mImeTop = 0; /** An enum value that tracks the visibility state of the task view */ private enum TaskViewVisibilityState { Loading Loading @@ -696,12 +699,19 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView return mTempBounds.bottom; } /** Update the amount by which to clip the expanded view at the bottom. */ public void updateBottomClip(int bottomClip) { mBottomClip = bottomClip; /** Notifies the expanded view that the IME top changed. */ public void onImeTopChanged(int imeTop) { mImeTop = imeTop; mBottomClip = max(getContentBottomOnScreen() - mImeTop, 0); onClipUpdate(); } void updateBottomClip() { if (mIsClipping) { onImeTopChanged(mImeTop); } } private void onClipUpdate() { if (mBottomClip == 0) { if (mIsClipping) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java +12 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.wm.shell.shared.bubbles.BubbleConstants.BUBBLE_EXPANDE import android.annotation.Nullable; import android.content.Context; import android.graphics.Insets; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; Loading Loading @@ -106,6 +107,7 @@ public class BubbleBarLayerView extends FrameLayout // Used to ensure touch target size for the menu shown on a bubble expanded view private TouchDelegate mHandleTouchDelegate; private final Rect mHandleTouchBounds = new Rect(); private Insets mInsets; public BubbleBarLayerView(Context context, BubbleController controller, BubbleData bubbleData, BubbleLogger bubbleLogger) { Loading Loading @@ -612,6 +614,7 @@ public class BubbleBarLayerView extends FrameLayout mExpandedView.setX(mTempRect.left); mExpandedView.setY(mTempRect.top); mExpandedView.updateLocation(); mExpandedView.updateBottomClip(); } private void showScrim(boolean show) { Loading Loading @@ -664,6 +667,15 @@ public class BubbleBarLayerView extends FrameLayout return mDragController; } /** Notifies view of device config update. */ public void update(DeviceConfig deviceConfig) { Insets newInsets = deviceConfig.getInsets(); if (!newInsets.equals(mInsets)) { mInsets = newInsets; updateExpandedView(); } } private class LocationChangeListener implements BaseBubblePinController.LocationChangeListener { Loading