Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59917dfb authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fix issue with the component layout not having updated on config change" into nyc-dev

parents 89f1622e 003eda6c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.systemui.R;
import com.android.systemui.RecentsComponent;
import com.android.systemui.SystemUI;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.ConfigurationChangedEvent;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
import com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent;
@@ -619,6 +620,12 @@ public class Recents extends SystemUI
        }
    }

    public final void onBusEvent(ConfigurationChangedEvent event) {
        // Update the configuration for the Recents component when the activity configuration
        // changes as well
        mImpl.onConfigurationChanged();
    }

    /**
     * Attempts to register with the system user.
     */
+2 −0
Original line number Diff line number Diff line
@@ -759,6 +759,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
            TaskStackLayoutAlgorithm stackLayout = stackView.getStackAlgorithm();
            TaskStackViewScroller stackScroller = stackView.getScroller();

            stackView.updateLayoutAlgorithm(true /* boundScroll */);
            stackView.updateToInitialState();

            for (int i = tasks.size() - 1; i >= 0; i--) {
@@ -825,6 +826,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        }

        // Get the transform for the running task
        stackView.updateLayoutAlgorithm(true /* boundScroll */);
        stackView.updateToInitialState();
        mTmpTransform = stackView.getStackAlgorithm().getStackTransformScreenCoordinates(launchTask,
                stackView.getScroller().getStackScroll(), mTmpTransform, null);
+2 −2
Original line number Diff line number Diff line
@@ -813,7 +813,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
     *
     * @see #updateLayoutAlgorithm(boolean, ArraySet<Task.TaskKey>)
     */
    void updateLayoutAlgorithm(boolean boundScrollToNewMinMax) {
   public void updateLayoutAlgorithm(boolean boundScrollToNewMinMax) {
        updateLayoutAlgorithm(boundScrollToNewMinMax, mIgnoreTasks);
    }

@@ -822,7 +822,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
     *
     * @param ignoreTasksSet the set of tasks to ignore in the relayout
     */
    void updateLayoutAlgorithm(boolean boundScrollToNewMinMax,
    public void updateLayoutAlgorithm(boolean boundScrollToNewMinMax,
            ArraySet<Task.TaskKey> ignoreTasksSet) {
        // Compute the min and max scroll values
        mLayoutAlgorithm.update(mStack, ignoreTasksSet);