Loading libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +9 −2 Original line number Diff line number Diff line Loading @@ -387,8 +387,15 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { return; } // Sync Transactions can't operate simultaneously with shell transition collection. // The transition animation (upon showing) will sync the location itself. if (isUsingShellTransitions() && mTaskViewTransitions.hasPending()) return; if (isUsingShellTransitions()) { if (mTaskViewTransitions.hasPending()) { // There is already a transition in-flight. The window bounds will be synced // once it is complete. return; } mTaskViewTransitions.setTaskBounds(this, boundsOnScreen); return; } WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(mTaskToken, boundsOnScreen); Loading libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTransitions.java +10 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.taskview; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading @@ -23,6 +24,7 @@ import static android.view.WindowManager.TRANSIT_TO_FRONT; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.graphics.Rect; import android.os.IBinder; import android.util.Slog; import android.view.SurfaceControl; Loading @@ -40,7 +42,7 @@ import java.util.ArrayList; * Handles Shell Transitions that involve TaskView tasks. */ public class TaskViewTransitions implements Transitions.TransitionHandler { private static final String TAG = "TaskViewTransitions"; static final String TAG = "TaskViewTransitions"; private final ArrayList<TaskViewTaskController> mTaskViews = new ArrayList<>(); private final ArrayList<PendingTransition> mPending = new ArrayList<>(); Loading Loading @@ -197,6 +199,13 @@ public class TaskViewTransitions implements Transitions.TransitionHandler { // visibility is reported in transition. } void setTaskBounds(TaskViewTaskController taskView, Rect boundsOnScreen) { WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(taskView.getTaskInfo().token, boundsOnScreen); mPending.add(new PendingTransition(TRANSIT_CHANGE, wct, taskView, null /* cookie */)); startNextTransition(); } private void startNextTransition() { if (mPending.isEmpty()) return; final PendingTransition pending = mPending.get(0); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +9 −2 Original line number Diff line number Diff line Loading @@ -387,8 +387,15 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { return; } // Sync Transactions can't operate simultaneously with shell transition collection. // The transition animation (upon showing) will sync the location itself. if (isUsingShellTransitions() && mTaskViewTransitions.hasPending()) return; if (isUsingShellTransitions()) { if (mTaskViewTransitions.hasPending()) { // There is already a transition in-flight. The window bounds will be synced // once it is complete. return; } mTaskViewTransitions.setTaskBounds(this, boundsOnScreen); return; } WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(mTaskToken, boundsOnScreen); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTransitions.java +10 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.taskview; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading @@ -23,6 +24,7 @@ import static android.view.WindowManager.TRANSIT_TO_FRONT; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.graphics.Rect; import android.os.IBinder; import android.util.Slog; import android.view.SurfaceControl; Loading @@ -40,7 +42,7 @@ import java.util.ArrayList; * Handles Shell Transitions that involve TaskView tasks. */ public class TaskViewTransitions implements Transitions.TransitionHandler { private static final String TAG = "TaskViewTransitions"; static final String TAG = "TaskViewTransitions"; private final ArrayList<TaskViewTaskController> mTaskViews = new ArrayList<>(); private final ArrayList<PendingTransition> mPending = new ArrayList<>(); Loading Loading @@ -197,6 +199,13 @@ public class TaskViewTransitions implements Transitions.TransitionHandler { // visibility is reported in transition. } void setTaskBounds(TaskViewTaskController taskView, Rect boundsOnScreen) { WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(taskView.getTaskInfo().token, boundsOnScreen); mPending.add(new PendingTransition(TRANSIT_CHANGE, wct, taskView, null /* cookie */)); startNextTransition(); } private void startNextTransition() { if (mPending.isEmpty()) return; final PendingTransition pending = mPending.get(0); Loading