Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +0 −1 Original line number Diff line number Diff line Loading @@ -708,7 +708,6 @@ public class Bubble implements BubbleViewProvider { /** * Sets the current bubble-transition that is coordinating a change in this bubble. */ @VisibleForTesting public void setPreparingTransition(BubbleTransitions.BubbleTransition transit) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "setPreparingTransition: transit=%s", transit); mPreparingTransition = transit; Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java +3 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,8 @@ public class BubbleTransitions { // we only do this when switching from floating bubbles to bar bubbles so guard this with // the bubble bar flag, but once these are combined we should be able to remove this. if (com.android.wm.shell.Flags.enableBubbleBar() && mBubbleData.getSelectedBubble() instanceof Bubble) { && mBubbleData.getSelectedBubble() instanceof Bubble && mBubbleData.isExpanded()) { ProtoLog.d( WM_SHELL_BUBBLES, "notifyUnfoldTransitionStarting transition=%s", transition); Bubble bubble = (Bubble) mBubbleData.getSelectedBubble(); Loading Loading @@ -1703,6 +1704,7 @@ public class BubbleTransitions { public void onTransitionConsumed(@NonNull IBinder transition, boolean aborted, @Nullable SurfaceControl.Transaction finishTransaction) { if (!aborted) return; mBubble.setPreparingTransition(null); mTransition = null; mTaskViewTransitions.onExternalDone(transition); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java +1 −0 Original line number Diff line number Diff line Loading @@ -627,6 +627,7 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition { mLeftoversHandler.onTransitionConsumed(transition, aborted, finishT); break; case TYPE_UNFOLD: mBubbleTransitions.notifyUnfoldTransitionFinished(transition); mUnfoldHandler.onTransitionConsumed(transition, aborted, finishT); break; case TYPE_OPEN_IN_DESKTOP: Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleTransitionsTest.java +14 −0 Original line number Diff line number Diff line Loading @@ -662,6 +662,7 @@ public class BubbleTransitionsTest extends ShellTestCase { setupBubble(); final IBinder unfoldTransition = mock(IBinder.class); when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); when(mBubbleData.isExpanded()).thenReturn(true); mBubbleTransitions.notifyUnfoldTransitionStarting(unfoldTransition); assertThat(mTaskViewTransitions.hasPending()).isTrue(); Loading @@ -677,6 +678,18 @@ public class BubbleTransitionsTest extends ShellTestCase { assertThat(mTaskViewTransitions.hasPending()).isFalse(); } @Test @EnableFlags(FLAG_ENABLE_BUBBLE_BAR) public void notifyUnfoldTransitionStarting_bubblesCollapsed_doesNotEnqueueExternal() { setupBubble(); final IBinder unfoldTransition = mock(IBinder.class); when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); when(mBubbleData.isExpanded()).thenReturn(false); mBubbleTransitions.notifyUnfoldTransitionStarting(unfoldTransition); assertThat(mTaskViewTransitions.hasPending()).isFalse(); } @Test @DisableFlags(FLAG_ENABLE_BUBBLE_BAR) public void notifyUnfoldTransitionStarting_bubbleBarDisabled() { Loading @@ -694,6 +707,7 @@ public class BubbleTransitionsTest extends ShellTestCase { setupBubble(); final IBinder unfoldTransition = mock(IBinder.class); when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); when(mBubbleData.isExpanded()).thenReturn(true); mBubbleTransitions.notifyUnfoldTransitionStarting(unfoldTransition); assertThat(mTaskViewTransitions.hasPending()).isTrue(); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +0 −1 Original line number Diff line number Diff line Loading @@ -708,7 +708,6 @@ public class Bubble implements BubbleViewProvider { /** * Sets the current bubble-transition that is coordinating a change in this bubble. */ @VisibleForTesting public void setPreparingTransition(BubbleTransitions.BubbleTransition transit) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "setPreparingTransition: transit=%s", transit); mPreparingTransition = transit; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java +3 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,8 @@ public class BubbleTransitions { // we only do this when switching from floating bubbles to bar bubbles so guard this with // the bubble bar flag, but once these are combined we should be able to remove this. if (com.android.wm.shell.Flags.enableBubbleBar() && mBubbleData.getSelectedBubble() instanceof Bubble) { && mBubbleData.getSelectedBubble() instanceof Bubble && mBubbleData.isExpanded()) { ProtoLog.d( WM_SHELL_BUBBLES, "notifyUnfoldTransitionStarting transition=%s", transition); Bubble bubble = (Bubble) mBubbleData.getSelectedBubble(); Loading Loading @@ -1703,6 +1704,7 @@ public class BubbleTransitions { public void onTransitionConsumed(@NonNull IBinder transition, boolean aborted, @Nullable SurfaceControl.Transaction finishTransaction) { if (!aborted) return; mBubble.setPreparingTransition(null); mTransition = null; mTaskViewTransitions.onExternalDone(transition); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java +1 −0 Original line number Diff line number Diff line Loading @@ -627,6 +627,7 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition { mLeftoversHandler.onTransitionConsumed(transition, aborted, finishT); break; case TYPE_UNFOLD: mBubbleTransitions.notifyUnfoldTransitionFinished(transition); mUnfoldHandler.onTransitionConsumed(transition, aborted, finishT); break; case TYPE_OPEN_IN_DESKTOP: Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleTransitionsTest.java +14 −0 Original line number Diff line number Diff line Loading @@ -662,6 +662,7 @@ public class BubbleTransitionsTest extends ShellTestCase { setupBubble(); final IBinder unfoldTransition = mock(IBinder.class); when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); when(mBubbleData.isExpanded()).thenReturn(true); mBubbleTransitions.notifyUnfoldTransitionStarting(unfoldTransition); assertThat(mTaskViewTransitions.hasPending()).isTrue(); Loading @@ -677,6 +678,18 @@ public class BubbleTransitionsTest extends ShellTestCase { assertThat(mTaskViewTransitions.hasPending()).isFalse(); } @Test @EnableFlags(FLAG_ENABLE_BUBBLE_BAR) public void notifyUnfoldTransitionStarting_bubblesCollapsed_doesNotEnqueueExternal() { setupBubble(); final IBinder unfoldTransition = mock(IBinder.class); when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); when(mBubbleData.isExpanded()).thenReturn(false); mBubbleTransitions.notifyUnfoldTransitionStarting(unfoldTransition); assertThat(mTaskViewTransitions.hasPending()).isFalse(); } @Test @DisableFlags(FLAG_ENABLE_BUBBLE_BAR) public void notifyUnfoldTransitionStarting_bubbleBarDisabled() { Loading @@ -694,6 +707,7 @@ public class BubbleTransitionsTest extends ShellTestCase { setupBubble(); final IBinder unfoldTransition = mock(IBinder.class); when(mBubbleData.getSelectedBubble()).thenReturn(mBubble); when(mBubbleData.isExpanded()).thenReturn(true); mBubbleTransitions.notifyUnfoldTransitionStarting(unfoldTransition); assertThat(mTaskViewTransitions.hasPending()).isTrue(); Loading