Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +15 −3 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import com.android.systemui.recents.views.TaskStackView; import com.android.systemui.recents.views.TaskStackViewScroller; import com.android.systemui.recents.views.TaskViewHeader; import com.android.systemui.recents.views.TaskViewTransform; import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm; import com.android.systemui.stackdivider.DividerView; import com.android.systemui.statusbar.BaseStatusBar; import com.android.systemui.statusbar.phone.NavigationBarGestureHelper; Loading Loading @@ -627,10 +628,21 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener stackLayout.initialize(displayRect, windowRect, mTaskStackBounds, TaskStackLayoutAlgorithm.StackState.getStackStateForStack(stack)); mDummyStackView.setTasks(stack, false /* allowNotifyStackChanges */); // Get the width of a task view so that we know how wide to draw the header bar. int taskViewWidth = 0; if (mDummyStackView.useGridLayout()) { TaskGridLayoutAlgorithm gridLayout = mDummyStackView.getGridAlgorithm(); gridLayout.initialize(windowRect); taskViewWidth = (int) gridLayout.getTransform(0 /* taskIndex */, stack.getTaskCount(), new TaskViewTransform(), stackLayout).rect.width(); } else { Rect taskViewBounds = stackLayout.getUntransformedTaskViewBounds(); if (!taskViewBounds.isEmpty()) { int taskViewWidth = taskViewBounds.width(); taskViewWidth = taskViewBounds.width(); } } if (taskViewWidth > 0) { synchronized (mHeaderBarLock) { if (mHeaderBar.getMeasuredWidth() != taskViewWidth || mHeaderBar.getMeasuredHeight() != mTaskBarHeight) { Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +6 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ import com.android.systemui.recents.model.Task; import com.android.systemui.recents.model.TaskStack; import com.android.systemui.recents.views.grid.GridTaskView; import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm; import com.android.systemui.recents.views.grid.TaskViewFocusFrame; import java.io.PrintWriter; import java.lang.annotation.Retention; Loading Loading @@ -447,6 +448,11 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal return mLayoutAlgorithm; } /** Returns the grid algorithm for this task stack. */ public TaskGridLayoutAlgorithm getGridAlgorithm() { return mLayoutAlgorithm.mTaskGridLayoutAlgorithm; } /** * Returns the touch handler for this task stack. */ Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +15 −3 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import com.android.systemui.recents.views.TaskStackView; import com.android.systemui.recents.views.TaskStackViewScroller; import com.android.systemui.recents.views.TaskViewHeader; import com.android.systemui.recents.views.TaskViewTransform; import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm; import com.android.systemui.stackdivider.DividerView; import com.android.systemui.statusbar.BaseStatusBar; import com.android.systemui.statusbar.phone.NavigationBarGestureHelper; Loading Loading @@ -627,10 +628,21 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener stackLayout.initialize(displayRect, windowRect, mTaskStackBounds, TaskStackLayoutAlgorithm.StackState.getStackStateForStack(stack)); mDummyStackView.setTasks(stack, false /* allowNotifyStackChanges */); // Get the width of a task view so that we know how wide to draw the header bar. int taskViewWidth = 0; if (mDummyStackView.useGridLayout()) { TaskGridLayoutAlgorithm gridLayout = mDummyStackView.getGridAlgorithm(); gridLayout.initialize(windowRect); taskViewWidth = (int) gridLayout.getTransform(0 /* taskIndex */, stack.getTaskCount(), new TaskViewTransform(), stackLayout).rect.width(); } else { Rect taskViewBounds = stackLayout.getUntransformedTaskViewBounds(); if (!taskViewBounds.isEmpty()) { int taskViewWidth = taskViewBounds.width(); taskViewWidth = taskViewBounds.width(); } } if (taskViewWidth > 0) { synchronized (mHeaderBarLock) { if (mHeaderBar.getMeasuredWidth() != taskViewWidth || mHeaderBar.getMeasuredHeight() != mTaskBarHeight) { Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +6 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ import com.android.systemui.recents.model.Task; import com.android.systemui.recents.model.TaskStack; import com.android.systemui.recents.views.grid.GridTaskView; import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm; import com.android.systemui.recents.views.grid.TaskViewFocusFrame; import java.io.PrintWriter; import java.lang.annotation.Retention; Loading Loading @@ -447,6 +448,11 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal return mLayoutAlgorithm; } /** Returns the grid algorithm for this task stack. */ public TaskGridLayoutAlgorithm getGridAlgorithm() { return mLayoutAlgorithm.mTaskGridLayoutAlgorithm; } /** * Returns the touch handler for this task stack. */ Loading