Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +12 −0 Original line number Diff line number Diff line Loading @@ -577,6 +577,18 @@ public class BubbleController implements ConfigurationController.ConfigurationLi return mBubbleScrim; } /** * Called when the status bar has become visible or invisible (either permanently or * temporarily). */ public void onStatusBarVisibilityChanged(boolean visible) { if (mStackView != null) { // Hide the stack temporarily if the status bar has been made invisible, and the stack // is collapsed. An expanded stack should remain visible until collapsed. mStackView.setTemporarilyInvisible(!visible && !isStackExpanded()); } } /** * Sets whether to perform inflation on the same thread as the caller. This method should only * be used in tests, not in production. Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +41 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import androidx.dynamicanimation.animation.SpringForce; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.ContrastColorUtil; import com.android.internal.widget.ViewClippingUtil; import com.android.systemui.Interpolators; import com.android.systemui.Prefs; import com.android.systemui.R; import com.android.systemui.bubbles.animation.ExpandedAnimationController; Loading @@ -89,6 +90,7 @@ import com.android.systemui.model.SysUiState; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment; import com.android.systemui.statusbar.phone.NotificationShadeWindowController; import com.android.systemui.util.DismissCircleView; import com.android.systemui.util.FloatingContentCoordinator; Loading Loading @@ -243,6 +245,9 @@ public class BubbleStackView extends FrameLayout /** Whether a touch gesture, such as a stack/bubble drag or flyout drag, is in progress. */ private boolean mIsGestureInProgress = false; /** Whether or not the stack is temporarily invisible off the side of the screen. */ private boolean mTemporarilyInvisible = false; /** Description of current animation controller state. */ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("Stack view state:"); Loading Loading @@ -919,6 +924,38 @@ public class BubbleStackView extends FrameLayout return true; }); animate() .setInterpolator(Interpolators.PANEL_CLOSE_ACCELERATED) .setDuration(CollapsedStatusBarFragment.FADE_IN_DURATION); } /** * Sets whether or not the stack should become temporarily invisible by moving off the side of * the screen. * * If a flyout comes in while it's invisible, it will animate back in while the flyout is * showing but disappear again when the flyout is gone. */ public void setTemporarilyInvisible(boolean invisible) { mTemporarilyInvisible = invisible; animateTemporarilyInvisible(); } /** * Animates onto or off the screen depending on whether we're temporarily invisible, and whether * a flyout is visible. */ private void animateTemporarilyInvisible() { if (mTemporarilyInvisible && mFlyout.getVisibility() != View.VISIBLE) { if (mStackAnimationController.isStackOnLeftSide()) { animate().translationX(-mBubbleSize).start(); } else { animate().translationX(mBubbleSize).start(); } } else { animate().translationX(0).start(); } } private void setUpManageMenu() { Loading Loading @@ -1989,6 +2026,9 @@ public class BubbleStackView extends FrameLayout // Stop suppressing the dot now that the flyout has morphed into the dot. bubbleView.removeDotSuppressionFlag( BadgedImageView.SuppressionFlag.FLYOUT_VISIBLE); mFlyout.setVisibility(INVISIBLE); animateTemporarilyInvisible(); }; mFlyout.setVisibility(INVISIBLE); Loading @@ -2006,6 +2046,7 @@ public class BubbleStackView extends FrameLayout final Runnable expandFlyoutAfterDelay = () -> { mAnimateInFlyout = () -> { mFlyout.setVisibility(VISIBLE); animateTemporarilyInvisible(); mFlyoutDragDeltaX = mStackAnimationController.isStackOnLeftSide() ? -mFlyout.getWidth() Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +13 −0 Original line number Diff line number Diff line Loading @@ -2253,6 +2253,8 @@ public class StatusBar extends SystemUI implements DemoMode, updateHideIconsForBouncer(false /* animate */); } } updateBubblesVisibility(); } @Override Loading @@ -2268,6 +2270,8 @@ public class StatusBar extends SystemUI implements DemoMode, } mLightBarController.onStatusBarAppearanceChanged(appearanceRegions, barModeChanged, mStatusBarMode, navbarColorManagedByIme); updateBubblesVisibility(); } @Override Loading Loading @@ -2311,6 +2315,7 @@ public class StatusBar extends SystemUI implements DemoMode, final int barMode = barMode(mTransientShown, mAppearance); if (updateBarMode(barMode)) { mLightBarController.onStatusBarModeChanged(barMode); updateBubblesVisibility(); } } Loading Loading @@ -2395,6 +2400,14 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationPanelViewController.setQsScrimEnabled(scrimEnabled); } /** Temporarily hides Bubbles if the status bar is hidden. */ private void updateBubblesVisibility() { mBubbleController.onStatusBarVisibilityChanged( mStatusBarMode != MODE_LIGHTS_OUT && mStatusBarMode != MODE_LIGHTS_OUT_TRANSPARENT && !mStatusBarWindowHidden); } void checkBarMode(@TransitionMode int mode, @WindowVisibleState int windowState, BarTransitions transitions) { final boolean anim = !mNoAnimationOnNextBarModeChange && mDeviceInteractive Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +12 −0 Original line number Diff line number Diff line Loading @@ -577,6 +577,18 @@ public class BubbleController implements ConfigurationController.ConfigurationLi return mBubbleScrim; } /** * Called when the status bar has become visible or invisible (either permanently or * temporarily). */ public void onStatusBarVisibilityChanged(boolean visible) { if (mStackView != null) { // Hide the stack temporarily if the status bar has been made invisible, and the stack // is collapsed. An expanded stack should remain visible until collapsed. mStackView.setTemporarilyInvisible(!visible && !isStackExpanded()); } } /** * Sets whether to perform inflation on the same thread as the caller. This method should only * be used in tests, not in production. Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +41 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import androidx.dynamicanimation.animation.SpringForce; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.ContrastColorUtil; import com.android.internal.widget.ViewClippingUtil; import com.android.systemui.Interpolators; import com.android.systemui.Prefs; import com.android.systemui.R; import com.android.systemui.bubbles.animation.ExpandedAnimationController; Loading @@ -89,6 +90,7 @@ import com.android.systemui.model.SysUiState; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment; import com.android.systemui.statusbar.phone.NotificationShadeWindowController; import com.android.systemui.util.DismissCircleView; import com.android.systemui.util.FloatingContentCoordinator; Loading Loading @@ -243,6 +245,9 @@ public class BubbleStackView extends FrameLayout /** Whether a touch gesture, such as a stack/bubble drag or flyout drag, is in progress. */ private boolean mIsGestureInProgress = false; /** Whether or not the stack is temporarily invisible off the side of the screen. */ private boolean mTemporarilyInvisible = false; /** Description of current animation controller state. */ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("Stack view state:"); Loading Loading @@ -919,6 +924,38 @@ public class BubbleStackView extends FrameLayout return true; }); animate() .setInterpolator(Interpolators.PANEL_CLOSE_ACCELERATED) .setDuration(CollapsedStatusBarFragment.FADE_IN_DURATION); } /** * Sets whether or not the stack should become temporarily invisible by moving off the side of * the screen. * * If a flyout comes in while it's invisible, it will animate back in while the flyout is * showing but disappear again when the flyout is gone. */ public void setTemporarilyInvisible(boolean invisible) { mTemporarilyInvisible = invisible; animateTemporarilyInvisible(); } /** * Animates onto or off the screen depending on whether we're temporarily invisible, and whether * a flyout is visible. */ private void animateTemporarilyInvisible() { if (mTemporarilyInvisible && mFlyout.getVisibility() != View.VISIBLE) { if (mStackAnimationController.isStackOnLeftSide()) { animate().translationX(-mBubbleSize).start(); } else { animate().translationX(mBubbleSize).start(); } } else { animate().translationX(0).start(); } } private void setUpManageMenu() { Loading Loading @@ -1989,6 +2026,9 @@ public class BubbleStackView extends FrameLayout // Stop suppressing the dot now that the flyout has morphed into the dot. bubbleView.removeDotSuppressionFlag( BadgedImageView.SuppressionFlag.FLYOUT_VISIBLE); mFlyout.setVisibility(INVISIBLE); animateTemporarilyInvisible(); }; mFlyout.setVisibility(INVISIBLE); Loading @@ -2006,6 +2046,7 @@ public class BubbleStackView extends FrameLayout final Runnable expandFlyoutAfterDelay = () -> { mAnimateInFlyout = () -> { mFlyout.setVisibility(VISIBLE); animateTemporarilyInvisible(); mFlyoutDragDeltaX = mStackAnimationController.isStackOnLeftSide() ? -mFlyout.getWidth() Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +13 −0 Original line number Diff line number Diff line Loading @@ -2253,6 +2253,8 @@ public class StatusBar extends SystemUI implements DemoMode, updateHideIconsForBouncer(false /* animate */); } } updateBubblesVisibility(); } @Override Loading @@ -2268,6 +2270,8 @@ public class StatusBar extends SystemUI implements DemoMode, } mLightBarController.onStatusBarAppearanceChanged(appearanceRegions, barModeChanged, mStatusBarMode, navbarColorManagedByIme); updateBubblesVisibility(); } @Override Loading Loading @@ -2311,6 +2315,7 @@ public class StatusBar extends SystemUI implements DemoMode, final int barMode = barMode(mTransientShown, mAppearance); if (updateBarMode(barMode)) { mLightBarController.onStatusBarModeChanged(barMode); updateBubblesVisibility(); } } Loading Loading @@ -2395,6 +2400,14 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationPanelViewController.setQsScrimEnabled(scrimEnabled); } /** Temporarily hides Bubbles if the status bar is hidden. */ private void updateBubblesVisibility() { mBubbleController.onStatusBarVisibilityChanged( mStatusBarMode != MODE_LIGHTS_OUT && mStatusBarMode != MODE_LIGHTS_OUT_TRANSPARENT && !mStatusBarWindowHidden); } void checkBarMode(@TransitionMode int mode, @WindowVisibleState int windowState, BarTransitions transitions) { final boolean anim = !mNoAnimationOnNextBarModeChange && mDeviceInteractive Loading