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

Commit 003eda6c authored by Winson's avatar Winson
Browse files

Fix issue with the component layout not having updated on config change

Bug: 27618066

Change-Id: I362c893222439c0dd1faa0000b29ead7ef621606
parent 79936ddd
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);