Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +7 −8 Original line number Diff line number Diff line Loading @@ -120,8 +120,6 @@ public class BubbleStackView extends FrameLayout private static final int EXPANDED_VIEW_ALPHA_ANIMATION_DURATION = 150; private static final int MANAGE_MENU_SCRIM_ANIM_DURATION = 150; private static final float SCRIM_ALPHA = 0.6f; /** Loading Loading @@ -894,6 +892,7 @@ public class BubbleStackView extends FrameLayout updatePointerPosition(false /* forIme */); mExpandedAnimationController.expandFromStack(() -> { afterExpandedViewAnimation(); showManageMenu(mShowingManage); } /* after */); final float translationY = mPositioner.getExpandedViewY(mExpandedBubble, getBubbleIndex(mExpandedBubble)); Loading Loading @@ -1253,9 +1252,6 @@ public class BubbleStackView extends FrameLayout mRelativeStackPositionBeforeRotation = new RelativeStackPosition( mPositioner.getRestingPosition(), mStackAnimationController.getAllowableStackPositionRegion()); mManageMenu.setVisibility(View.INVISIBLE); mShowingManage = false; addOnLayoutChangeListener(mOrientationChangedListener); hideFlyoutImmediate(); } Loading Loading @@ -2555,16 +2551,19 @@ public class BubbleStackView extends FrameLayout invalidate(); } private void showManageMenu(boolean show) { /** Hide or show the manage menu for the currently expanded bubble. */ @VisibleForTesting public void showManageMenu(boolean show) { mShowingManage = show; // This should not happen, since the manage menu is only visible when there's an expanded // bubble. If we end up in this state, just hide the menu immediately. if (mExpandedBubble == null || mExpandedBubble.getExpandedView() == null) { mManageMenu.setVisibility(View.INVISIBLE); mManageMenuScrim.setVisibility(INVISIBLE); mBubbleController.getSysuiProxy().onManageMenuExpandChanged(false /* show */); return; } if (show) { mManageMenuScrim.setVisibility(VISIBLE); mManageMenuScrim.setTranslationZ(mManageMenu.getElevation() - 1f); Loading @@ -2576,8 +2575,8 @@ public class BubbleStackView extends FrameLayout } }; mBubbleController.getSysuiProxy().onManageMenuExpandChanged(show); mManageMenuScrim.animate() .setDuration(MANAGE_MENU_SCRIM_ANIM_DURATION) .setInterpolator(show ? ALPHA_IN : ALPHA_OUT) .alpha(show ? SCRIM_ALPHA : 0f) .withEndAction(endAction) Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java +2 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,8 @@ public interface Bubbles { void onStackExpandChanged(boolean shouldExpand); void onManageMenuExpandChanged(boolean menuExpanded); void onUnbubbleConversation(String key); } } packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java +6 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,8 @@ public class QuickStepContract { public static final int SYSUI_STATE_DEVICE_DOZING = 1 << 21; // The home feature is disabled (either by SUW/SysUI/device policy) public static final int SYSUI_STATE_BACK_DISABLED = 1 << 22; // The bubble stack is expanded AND the mange menu for bubbles is expanded on top of it. public static final int SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED = 1 << 23; @Retention(RetentionPolicy.SOURCE) @IntDef({SYSUI_STATE_SCREEN_PINNING, Loading @@ -142,7 +144,8 @@ public class QuickStepContract { SYSUI_STATE_MAGNIFICATION_OVERLAP, SYSUI_STATE_IME_SWITCHER_SHOWING, SYSUI_STATE_DEVICE_DOZING, SYSUI_STATE_BACK_DISABLED SYSUI_STATE_BACK_DISABLED, SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED }) public @interface SystemUiStateFlags {} Loading Loading @@ -174,6 +177,8 @@ public class QuickStepContract { str.add((flags & SYSUI_STATE_IME_SWITCHER_SHOWING) != 0 ? "ime_switcher_showing" : ""); str.add((flags & SYSUI_STATE_DEVICE_DOZING) != 0 ? "device_dozing" : ""); str.add((flags & SYSUI_STATE_BACK_DISABLED) != 0 ? "back_disabled" : ""); str.add((flags & SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED) != 0 ? "bubbles_mange_menu_expanded" : ""); return str.toString(); } Loading packages/SystemUI/src/com/android/systemui/wmshell/BubblesManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -377,9 +377,23 @@ public class BubblesManager implements Dumpable { sysuiMainExecutor.execute(() -> { sysUiState.setFlag(QuickStepContract.SYSUI_STATE_BUBBLES_EXPANDED, shouldExpand) .commitUpdate(mContext.getDisplayId()); if (!shouldExpand) { sysUiState.setFlag( QuickStepContract.SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED, false).commitUpdate(mContext.getDisplayId()); } }); } @Override public void onManageMenuExpandChanged(boolean menuExpanded) { sysuiMainExecutor.execute(() -> { sysUiState.setFlag(QuickStepContract.SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED, menuExpanded).commitUpdate(mContext.getDisplayId()); }); } @Override public void onUnbubbleConversation(String key) { sysuiMainExecutor.execute(() -> { Loading packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BUBBLES_EXPANDED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_GLOBAL_ACTIONS_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ONE_HANDED_ACTIVE; Loading Loading @@ -101,6 +102,7 @@ public final class WMShell extends SystemUI | SYSUI_STATE_BOUNCER_SHOWING | SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED | SYSUI_STATE_BUBBLES_EXPANDED | SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED | SYSUI_STATE_QUICK_SETTINGS_EXPANDED; // Shell interfaces Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +7 −8 Original line number Diff line number Diff line Loading @@ -120,8 +120,6 @@ public class BubbleStackView extends FrameLayout private static final int EXPANDED_VIEW_ALPHA_ANIMATION_DURATION = 150; private static final int MANAGE_MENU_SCRIM_ANIM_DURATION = 150; private static final float SCRIM_ALPHA = 0.6f; /** Loading Loading @@ -894,6 +892,7 @@ public class BubbleStackView extends FrameLayout updatePointerPosition(false /* forIme */); mExpandedAnimationController.expandFromStack(() -> { afterExpandedViewAnimation(); showManageMenu(mShowingManage); } /* after */); final float translationY = mPositioner.getExpandedViewY(mExpandedBubble, getBubbleIndex(mExpandedBubble)); Loading Loading @@ -1253,9 +1252,6 @@ public class BubbleStackView extends FrameLayout mRelativeStackPositionBeforeRotation = new RelativeStackPosition( mPositioner.getRestingPosition(), mStackAnimationController.getAllowableStackPositionRegion()); mManageMenu.setVisibility(View.INVISIBLE); mShowingManage = false; addOnLayoutChangeListener(mOrientationChangedListener); hideFlyoutImmediate(); } Loading Loading @@ -2555,16 +2551,19 @@ public class BubbleStackView extends FrameLayout invalidate(); } private void showManageMenu(boolean show) { /** Hide or show the manage menu for the currently expanded bubble. */ @VisibleForTesting public void showManageMenu(boolean show) { mShowingManage = show; // This should not happen, since the manage menu is only visible when there's an expanded // bubble. If we end up in this state, just hide the menu immediately. if (mExpandedBubble == null || mExpandedBubble.getExpandedView() == null) { mManageMenu.setVisibility(View.INVISIBLE); mManageMenuScrim.setVisibility(INVISIBLE); mBubbleController.getSysuiProxy().onManageMenuExpandChanged(false /* show */); return; } if (show) { mManageMenuScrim.setVisibility(VISIBLE); mManageMenuScrim.setTranslationZ(mManageMenu.getElevation() - 1f); Loading @@ -2576,8 +2575,8 @@ public class BubbleStackView extends FrameLayout } }; mBubbleController.getSysuiProxy().onManageMenuExpandChanged(show); mManageMenuScrim.animate() .setDuration(MANAGE_MENU_SCRIM_ANIM_DURATION) .setInterpolator(show ? ALPHA_IN : ALPHA_OUT) .alpha(show ? SCRIM_ALPHA : 0f) .withEndAction(endAction) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java +2 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,8 @@ public interface Bubbles { void onStackExpandChanged(boolean shouldExpand); void onManageMenuExpandChanged(boolean menuExpanded); void onUnbubbleConversation(String key); } }
packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java +6 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,8 @@ public class QuickStepContract { public static final int SYSUI_STATE_DEVICE_DOZING = 1 << 21; // The home feature is disabled (either by SUW/SysUI/device policy) public static final int SYSUI_STATE_BACK_DISABLED = 1 << 22; // The bubble stack is expanded AND the mange menu for bubbles is expanded on top of it. public static final int SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED = 1 << 23; @Retention(RetentionPolicy.SOURCE) @IntDef({SYSUI_STATE_SCREEN_PINNING, Loading @@ -142,7 +144,8 @@ public class QuickStepContract { SYSUI_STATE_MAGNIFICATION_OVERLAP, SYSUI_STATE_IME_SWITCHER_SHOWING, SYSUI_STATE_DEVICE_DOZING, SYSUI_STATE_BACK_DISABLED SYSUI_STATE_BACK_DISABLED, SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED }) public @interface SystemUiStateFlags {} Loading Loading @@ -174,6 +177,8 @@ public class QuickStepContract { str.add((flags & SYSUI_STATE_IME_SWITCHER_SHOWING) != 0 ? "ime_switcher_showing" : ""); str.add((flags & SYSUI_STATE_DEVICE_DOZING) != 0 ? "device_dozing" : ""); str.add((flags & SYSUI_STATE_BACK_DISABLED) != 0 ? "back_disabled" : ""); str.add((flags & SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED) != 0 ? "bubbles_mange_menu_expanded" : ""); return str.toString(); } Loading
packages/SystemUI/src/com/android/systemui/wmshell/BubblesManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -377,9 +377,23 @@ public class BubblesManager implements Dumpable { sysuiMainExecutor.execute(() -> { sysUiState.setFlag(QuickStepContract.SYSUI_STATE_BUBBLES_EXPANDED, shouldExpand) .commitUpdate(mContext.getDisplayId()); if (!shouldExpand) { sysUiState.setFlag( QuickStepContract.SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED, false).commitUpdate(mContext.getDisplayId()); } }); } @Override public void onManageMenuExpandChanged(boolean menuExpanded) { sysuiMainExecutor.execute(() -> { sysUiState.setFlag(QuickStepContract.SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED, menuExpanded).commitUpdate(mContext.getDisplayId()); }); } @Override public void onUnbubbleConversation(String key) { sysuiMainExecutor.execute(() -> { Loading
packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BUBBLES_EXPANDED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_GLOBAL_ACTIONS_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ONE_HANDED_ACTIVE; Loading Loading @@ -101,6 +102,7 @@ public final class WMShell extends SystemUI | SYSUI_STATE_BOUNCER_SHOWING | SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED | SYSUI_STATE_BUBBLES_EXPANDED | SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED | SYSUI_STATE_QUICK_SETTINGS_EXPANDED; // Shell interfaces Loading