Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +13 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_BUBBLE_EXPAND import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES; import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.wm.shell.bubbles.BubblePositioner.MAX_HEIGHT; import static com.android.wm.shell.transition.Transitions.ENABLE_SHELL_TRANSITIONS; import android.annotation.NonNull; import android.annotation.SuppressLint; Loading Loading @@ -1057,13 +1058,21 @@ public class BubbleExpandedView extends LinearLayout { Log.d(TAG, "cleanUpExpandedState: bubble=" + getBubbleKey() + " task=" + mTaskId); } if (getTaskId() != INVALID_TASK_ID) { // Ensure the task is removed from WM if (ENABLE_SHELL_TRANSITIONS) { if (mTaskView != null) { mTaskView.removeTask(); } } else { try { ActivityTaskManager.getService().removeTask(getTaskId()); } catch (RemoteException e) { Log.w(TAG, e.getMessage()); } } } if (mTaskView != null) { // Release the surface & other task view related things mTaskView.release(); removeView(mTaskView); mTaskView = null; Loading libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskView.java +7 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,13 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, mTaskViewTaskController.setWindowBounds(mTmpRect); } /** * Call to remove the task from window manager. This task will not appear in recents. */ public void removeTask() { mTaskViewTaskController.removeTask(); } /** * Release this container if it is initialized. */ Loading libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +10 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { } /** Until all users are converted, we may have mixed-use (eg. Car). */ private boolean isUsingShellTransitions() { public boolean isUsingShellTransitions() { return mTaskViewTransitions != null && mTaskViewTransitions.isEnabled(); } Loading Loading @@ -401,6 +401,15 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { mSyncQueue.queue(wct); } /** * Call to remove the task from window manager. This task will not appear in recents. */ void removeTask() { WindowContainerTransaction wct = new WindowContainerTransaction(); wct.removeTask(mTaskToken); mTaskViewTransitions.closeTaskView(wct, this); } /** Should be called when the client surface is destroyed. */ public void surfaceDestroyed() { mSurfaceCreated = false; Loading libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTransitions.java +13 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.wm.shell.taskview; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -201,6 +202,13 @@ public class TaskViewTransitions implements Transitions.TransitionHandler { startNextTransition(); } void closeTaskView(@NonNull WindowContainerTransaction wct, @NonNull TaskViewTaskController taskView) { updateVisibilityState(taskView, false /* visible */); mPending.add(new PendingTransition(TRANSIT_CLOSE, wct, taskView, null /* cookie */)); startNextTransition(); } void setTaskViewVisible(TaskViewTaskController taskView, boolean visible) { if (mTaskViews.get(taskView) == null) return; if (mTaskViews.get(taskView).mVisible == visible) return; Loading Loading @@ -297,6 +305,11 @@ public class TaskViewTransitions implements Transitions.TransitionHandler { if (TransitionUtil.isClosingType(chg.getMode())) { final boolean isHide = chg.getMode() == TRANSIT_TO_BACK; TaskViewTaskController tv = findTaskView(chg.getTaskInfo()); if (tv == null && !isHide) { // TaskView can be null when closing changesHandled++; continue; } if (tv == null) { if (pending != null) { Slog.w(TAG, "Found a non-TaskView task in a TaskView Transition. This " Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +13 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_BUBBLE_EXPAND import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES; import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.wm.shell.bubbles.BubblePositioner.MAX_HEIGHT; import static com.android.wm.shell.transition.Transitions.ENABLE_SHELL_TRANSITIONS; import android.annotation.NonNull; import android.annotation.SuppressLint; Loading Loading @@ -1057,13 +1058,21 @@ public class BubbleExpandedView extends LinearLayout { Log.d(TAG, "cleanUpExpandedState: bubble=" + getBubbleKey() + " task=" + mTaskId); } if (getTaskId() != INVALID_TASK_ID) { // Ensure the task is removed from WM if (ENABLE_SHELL_TRANSITIONS) { if (mTaskView != null) { mTaskView.removeTask(); } } else { try { ActivityTaskManager.getService().removeTask(getTaskId()); } catch (RemoteException e) { Log.w(TAG, e.getMessage()); } } } if (mTaskView != null) { // Release the surface & other task view related things mTaskView.release(); removeView(mTaskView); mTaskView = null; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskView.java +7 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,13 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, mTaskViewTaskController.setWindowBounds(mTmpRect); } /** * Call to remove the task from window manager. This task will not appear in recents. */ public void removeTask() { mTaskViewTaskController.removeTask(); } /** * Release this container if it is initialized. */ Loading
libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +10 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { } /** Until all users are converted, we may have mixed-use (eg. Car). */ private boolean isUsingShellTransitions() { public boolean isUsingShellTransitions() { return mTaskViewTransitions != null && mTaskViewTransitions.isEnabled(); } Loading Loading @@ -401,6 +401,15 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { mSyncQueue.queue(wct); } /** * Call to remove the task from window manager. This task will not appear in recents. */ void removeTask() { WindowContainerTransaction wct = new WindowContainerTransaction(); wct.removeTask(mTaskToken); mTaskViewTransitions.closeTaskView(wct, this); } /** Should be called when the client surface is destroyed. */ public void surfaceDestroyed() { mSurfaceCreated = false; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTransitions.java +13 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.wm.shell.taskview; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -201,6 +202,13 @@ public class TaskViewTransitions implements Transitions.TransitionHandler { startNextTransition(); } void closeTaskView(@NonNull WindowContainerTransaction wct, @NonNull TaskViewTaskController taskView) { updateVisibilityState(taskView, false /* visible */); mPending.add(new PendingTransition(TRANSIT_CLOSE, wct, taskView, null /* cookie */)); startNextTransition(); } void setTaskViewVisible(TaskViewTaskController taskView, boolean visible) { if (mTaskViews.get(taskView) == null) return; if (mTaskViews.get(taskView).mVisible == visible) return; Loading Loading @@ -297,6 +305,11 @@ public class TaskViewTransitions implements Transitions.TransitionHandler { if (TransitionUtil.isClosingType(chg.getMode())) { final boolean isHide = chg.getMode() == TRANSIT_TO_BACK; TaskViewTaskController tv = findTaskView(chg.getTaskInfo()); if (tv == null && !isHide) { // TaskView can be null when closing changesHandled++; continue; } if (tv == null) { if (pending != null) { Slog.w(TAG, "Found a non-TaskView task in a TaskView Transition. This " Loading