Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -657,7 +657,13 @@ public class BubbleController implements ConfigurationController.ConfigurationLi try { try { mAddedToWindowManager = false; mAddedToWindowManager = false; if (mStackView != null) { mWindowManager.removeView(mStackView); mWindowManager.removeView(mStackView); mStackView.removeView(mBubbleScrim); mStackView = null; } else { Log.w(TAG, "StackView added to WindowManager, but was null when removing!"); } } catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) { // This means the stack has already been removed - it shouldn't happen, but ignore if it // This means the stack has already been removed - it shouldn't happen, but ignore if it // does, since we wanted it removed anyway. // does, since we wanted it removed anyway. Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -306,8 +306,10 @@ public class BubbleExpandedView extends LinearLayout { * if a view has been added or removed from on top of the ActivityView, such as the manage menu. * if a view has been added or removed from on top of the ActivityView, such as the manage menu. */ */ void updateObscuredTouchableRegion() { void updateObscuredTouchableRegion() { if (mActivityView != null) { mActivityView.onLocationChanged(); mActivityView.onLocationChanged(); } } } void applyThemeAttrs() { void applyThemeAttrs() { final TypedArray ta = mContext.obtainStyledAttributes( final TypedArray ta = mContext.obtainStyledAttributes( Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -129,7 +129,7 @@ public class BubbleOverflow implements BubbleViewProvider { return mOverflowBtn; return mOverflowBtn; } } void setBtnVisible(int visible) { void setVisible(int visible) { mOverflowBtn.setVisibility(visible); mOverflowBtn.setVisibility(visible); } } Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +9 −15 Original line number Original line Diff line number Diff line Loading @@ -1117,6 +1117,9 @@ public class BubbleStackView extends FrameLayout super.onDetachedFromWindow(); super.onDetachedFromWindow(); getViewTreeObserver().removeOnPreDrawListener(mViewUpdater); getViewTreeObserver().removeOnPreDrawListener(mViewUpdater); getViewTreeObserver().removeOnComputeInternalInsetsListener(this); getViewTreeObserver().removeOnComputeInternalInsetsListener(this); if (mBubbleOverflow != null && mBubbleOverflow.getExpandedView() != null) { mBubbleOverflow.getExpandedView().cleanUpExpandedState(); } } } @Override @Override Loading Loading @@ -1334,21 +1337,12 @@ public class BubbleStackView extends FrameLayout Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); } } private void updateOverflowBtnVisibility() { private void updateOverflowVisibility() { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext) || mBubbleOverflow == null) { return; return; } } if (mIsExpanded) { mBubbleOverflow.setVisible(mIsExpanded ? VISIBLE : GONE); if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "Show overflow button."); } mBubbleOverflow.setBtnVisible(VISIBLE); } else { if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "Collapsed. Hide overflow button."); } mBubbleOverflow.setBtnVisible(GONE); } } } // via BubbleData.Listener // via BubbleData.Listener Loading Loading @@ -1602,7 +1596,7 @@ public class BubbleStackView extends FrameLayout Log.d(TAG, BubbleDebugConfig.formatBubblesString(getBubblesOnScreen(), Log.d(TAG, BubbleDebugConfig.formatBubblesString(getBubblesOnScreen(), mExpandedBubble)); mExpandedBubble)); } } updateOverflowBtnVisibility(); updateOverflowVisibility(); mBubbleContainer.cancelAllAnimations(); mBubbleContainer.cancelAllAnimations(); mExpandedAnimationController.collapseBackToStack( mExpandedAnimationController.collapseBackToStack( mStackAnimationController.getStackPositionAlongNearestHorizontalEdge() mStackAnimationController.getStackPositionAlongNearestHorizontalEdge() Loading @@ -1626,7 +1620,7 @@ public class BubbleStackView extends FrameLayout beforeExpandedViewAnimation(); beforeExpandedViewAnimation(); mBubbleContainer.setActiveController(mExpandedAnimationController); mBubbleContainer.setActiveController(mExpandedAnimationController); updateOverflowBtnVisibility(); updateOverflowVisibility(); mExpandedAnimationController.expandFromStack(() -> { mExpandedAnimationController.expandFromStack(() -> { updatePointerPosition(); updatePointerPosition(); afterExpandedViewAnimation(); afterExpandedViewAnimation(); Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -657,7 +657,13 @@ public class BubbleController implements ConfigurationController.ConfigurationLi try { try { mAddedToWindowManager = false; mAddedToWindowManager = false; if (mStackView != null) { mWindowManager.removeView(mStackView); mWindowManager.removeView(mStackView); mStackView.removeView(mBubbleScrim); mStackView = null; } else { Log.w(TAG, "StackView added to WindowManager, but was null when removing!"); } } catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) { // This means the stack has already been removed - it shouldn't happen, but ignore if it // This means the stack has already been removed - it shouldn't happen, but ignore if it // does, since we wanted it removed anyway. // does, since we wanted it removed anyway. Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -306,8 +306,10 @@ public class BubbleExpandedView extends LinearLayout { * if a view has been added or removed from on top of the ActivityView, such as the manage menu. * if a view has been added or removed from on top of the ActivityView, such as the manage menu. */ */ void updateObscuredTouchableRegion() { void updateObscuredTouchableRegion() { if (mActivityView != null) { mActivityView.onLocationChanged(); mActivityView.onLocationChanged(); } } } void applyThemeAttrs() { void applyThemeAttrs() { final TypedArray ta = mContext.obtainStyledAttributes( final TypedArray ta = mContext.obtainStyledAttributes( Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -129,7 +129,7 @@ public class BubbleOverflow implements BubbleViewProvider { return mOverflowBtn; return mOverflowBtn; } } void setBtnVisible(int visible) { void setVisible(int visible) { mOverflowBtn.setVisibility(visible); mOverflowBtn.setVisibility(visible); } } Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +9 −15 Original line number Original line Diff line number Diff line Loading @@ -1117,6 +1117,9 @@ public class BubbleStackView extends FrameLayout super.onDetachedFromWindow(); super.onDetachedFromWindow(); getViewTreeObserver().removeOnPreDrawListener(mViewUpdater); getViewTreeObserver().removeOnPreDrawListener(mViewUpdater); getViewTreeObserver().removeOnComputeInternalInsetsListener(this); getViewTreeObserver().removeOnComputeInternalInsetsListener(this); if (mBubbleOverflow != null && mBubbleOverflow.getExpandedView() != null) { mBubbleOverflow.getExpandedView().cleanUpExpandedState(); } } } @Override @Override Loading Loading @@ -1334,21 +1337,12 @@ public class BubbleStackView extends FrameLayout Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); } } private void updateOverflowBtnVisibility() { private void updateOverflowVisibility() { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext) || mBubbleOverflow == null) { return; return; } } if (mIsExpanded) { mBubbleOverflow.setVisible(mIsExpanded ? VISIBLE : GONE); if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "Show overflow button."); } mBubbleOverflow.setBtnVisible(VISIBLE); } else { if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "Collapsed. Hide overflow button."); } mBubbleOverflow.setBtnVisible(GONE); } } } // via BubbleData.Listener // via BubbleData.Listener Loading Loading @@ -1602,7 +1596,7 @@ public class BubbleStackView extends FrameLayout Log.d(TAG, BubbleDebugConfig.formatBubblesString(getBubblesOnScreen(), Log.d(TAG, BubbleDebugConfig.formatBubblesString(getBubblesOnScreen(), mExpandedBubble)); mExpandedBubble)); } } updateOverflowBtnVisibility(); updateOverflowVisibility(); mBubbleContainer.cancelAllAnimations(); mBubbleContainer.cancelAllAnimations(); mExpandedAnimationController.collapseBackToStack( mExpandedAnimationController.collapseBackToStack( mStackAnimationController.getStackPositionAlongNearestHorizontalEdge() mStackAnimationController.getStackPositionAlongNearestHorizontalEdge() Loading @@ -1626,7 +1620,7 @@ public class BubbleStackView extends FrameLayout beforeExpandedViewAnimation(); beforeExpandedViewAnimation(); mBubbleContainer.setActiveController(mExpandedAnimationController); mBubbleContainer.setActiveController(mExpandedAnimationController); updateOverflowBtnVisibility(); updateOverflowVisibility(); mExpandedAnimationController.expandFromStack(() -> { mExpandedAnimationController.expandFromStack(() -> { updatePointerPosition(); updatePointerPosition(); afterExpandedViewAnimation(); afterExpandedViewAnimation(); Loading