Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java +19 −2 Original line number Diff line number Diff line Loading @@ -145,6 +145,13 @@ public class BubbleTransitions { } for (IBinder cookie : info.getTriggerTask().launchCookies) { if (mPendingEnterTransitions.containsKey(cookie)) { if (mBubbleData.hasAnyBubbleWithKey(Bubble.getAppBubbleKeyForTask( info.getTriggerTask()))) { // We'll let this transition fall through and let the normal TaskViewTransitions // play it mPendingEnterTransitions.remove(cookie); return false; } return true; } } Loading Loading @@ -530,6 +537,10 @@ public class BubbleTransitions { mTransition = null; } /** * @return true As DefaultMixedTransition assumes that this transition will be handled by * this handler in all cases. */ @Override public boolean startAnimation(@NonNull IBinder transition, @NonNull TransitionInfo info, Loading Loading @@ -570,7 +581,8 @@ public class BubbleTransitions { + "one, cleaning up the task view"); mBubble.getTaskView().getController().setTaskNotFound(); mTaskViewTransitions.onExternalDone(mTransition); return false; finishCallback.onTransitionFinished(null /* finishWct */); return true; } mFinishCb = finishCallback; Loading Loading @@ -827,6 +839,10 @@ public class BubbleTransitions { mEnterTransitions.remove(transition); } /** * @return true As DefaultMixedTransition assumes that this transition will be handled by * this handler in all cases. */ @Override public boolean startAnimation(@NonNull IBinder transition, @NonNull TransitionInfo info, Loading Loading @@ -867,7 +883,8 @@ public class BubbleTransitions { + "one, cleaning up the task view"); mBubble.getTaskView().getController().setTaskNotFound(); mTaskViewTransitions.onExternalDone(mTransition); return false; finishCallback.onTransitionFinished(null /* finishWct */); return true; } mFinishCb = finishCallback; Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblesTransitionObserver.java +13 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.bubbles; import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_NOISY; import android.app.ActivityManager; import android.os.IBinder; Loading @@ -24,7 +25,9 @@ import android.window.TransitionInfo; import androidx.annotation.NonNull; import com.android.internal.protolog.ProtoLog; import com.android.wm.shell.shared.TransitionUtil; import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper; import com.android.wm.shell.transition.Transitions; /** Loading Loading @@ -60,17 +63,25 @@ public class BubblesTransitionObserver implements Transitions.TransitionObserver continue; } final int expandedId = mBubbleData.getSelectedBubble().getTaskId(); // If the task id that's opening is the same as the expanded bubble, skip collapsing // If the opening task id is the same as the expanded bubble, skip collapsing // because it is our bubble that is opening. if (expandedId == INVALID_TASK_ID || expandedId == taskInfo.taskId) { continue; } // If the task is opening on a different display, skip collapsing because the task // If the opening task is on a different display, skip collapsing because the task // opening does not visually overlap with the bubbles. final int bubbleViewDisplayId = mBubbleController.getCurrentViewDisplayId(); if (taskInfo.displayId != bubbleViewDisplayId) { continue; } // If the opening task was launched by another bubble, skip collapsing the existing one // since BubbleTransitions will start a new bubble for it if (BubbleAnythingFlagHelper.enableCreateAnyBubble() && taskInfo.isAppBubble) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "TransitionObserver.onTransitionReady(): skipping app bubble for taskId=%d", taskInfo.taskId); continue; } mBubbleData.setExpanded(false); } } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java +19 −2 Original line number Diff line number Diff line Loading @@ -145,6 +145,13 @@ public class BubbleTransitions { } for (IBinder cookie : info.getTriggerTask().launchCookies) { if (mPendingEnterTransitions.containsKey(cookie)) { if (mBubbleData.hasAnyBubbleWithKey(Bubble.getAppBubbleKeyForTask( info.getTriggerTask()))) { // We'll let this transition fall through and let the normal TaskViewTransitions // play it mPendingEnterTransitions.remove(cookie); return false; } return true; } } Loading Loading @@ -530,6 +537,10 @@ public class BubbleTransitions { mTransition = null; } /** * @return true As DefaultMixedTransition assumes that this transition will be handled by * this handler in all cases. */ @Override public boolean startAnimation(@NonNull IBinder transition, @NonNull TransitionInfo info, Loading Loading @@ -570,7 +581,8 @@ public class BubbleTransitions { + "one, cleaning up the task view"); mBubble.getTaskView().getController().setTaskNotFound(); mTaskViewTransitions.onExternalDone(mTransition); return false; finishCallback.onTransitionFinished(null /* finishWct */); return true; } mFinishCb = finishCallback; Loading Loading @@ -827,6 +839,10 @@ public class BubbleTransitions { mEnterTransitions.remove(transition); } /** * @return true As DefaultMixedTransition assumes that this transition will be handled by * this handler in all cases. */ @Override public boolean startAnimation(@NonNull IBinder transition, @NonNull TransitionInfo info, Loading Loading @@ -867,7 +883,8 @@ public class BubbleTransitions { + "one, cleaning up the task view"); mBubble.getTaskView().getController().setTaskNotFound(); mTaskViewTransitions.onExternalDone(mTransition); return false; finishCallback.onTransitionFinished(null /* finishWct */); return true; } mFinishCb = finishCallback; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblesTransitionObserver.java +13 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.bubbles; import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_NOISY; import android.app.ActivityManager; import android.os.IBinder; Loading @@ -24,7 +25,9 @@ import android.window.TransitionInfo; import androidx.annotation.NonNull; import com.android.internal.protolog.ProtoLog; import com.android.wm.shell.shared.TransitionUtil; import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper; import com.android.wm.shell.transition.Transitions; /** Loading Loading @@ -60,17 +63,25 @@ public class BubblesTransitionObserver implements Transitions.TransitionObserver continue; } final int expandedId = mBubbleData.getSelectedBubble().getTaskId(); // If the task id that's opening is the same as the expanded bubble, skip collapsing // If the opening task id is the same as the expanded bubble, skip collapsing // because it is our bubble that is opening. if (expandedId == INVALID_TASK_ID || expandedId == taskInfo.taskId) { continue; } // If the task is opening on a different display, skip collapsing because the task // If the opening task is on a different display, skip collapsing because the task // opening does not visually overlap with the bubbles. final int bubbleViewDisplayId = mBubbleController.getCurrentViewDisplayId(); if (taskInfo.displayId != bubbleViewDisplayId) { continue; } // If the opening task was launched by another bubble, skip collapsing the existing one // since BubbleTransitions will start a new bubble for it if (BubbleAnythingFlagHelper.enableCreateAnyBubble() && taskInfo.isAppBubble) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "TransitionObserver.onTransitionReady(): skipping app bubble for taskId=%d", taskInfo.taskId); continue; } mBubbleData.setExpanded(false); } } Loading