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

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

Merge "Fixing issue where the configuration can have stale docked state."

parents 73d6dab4 d759a712
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ public class RecentsConfiguration {
    public final int smallestWidth;

    /** Misc **/
    public boolean hasDockedTasks;
    public boolean useHardwareLayers;
    public boolean fakeShadows;
    public int svelteLevel;
@@ -112,7 +111,6 @@ public class RecentsConfiguration {
        // settings or via multi window
        lockToAppEnabled = !ssp.hasFreeformWorkspaceSupport() &&
                ssp.getSystemSetting(context, Settings.System.LOCK_TO_APP_ENABLED) != 0;
        hasDockedTasks = ssp.hasDockedTask();

        // Recompute some values based on the given state, since we can not rely on the resource
        // system to get certain values.
+3 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import com.android.systemui.recents.events.ui.dragndrop.DragEndEvent;
import com.android.systemui.recents.events.ui.dragndrop.DragStartEvent;
import com.android.systemui.recents.events.ui.dragndrop.DragStartInitializeDropTargetsEvent;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.model.TaskStack;

@@ -111,6 +112,7 @@ public class RecentsViewTouchHandler {
    /**** Events ****/

    public final void onBusEvent(DragStartEvent event) {
        SystemServicesProxy ssp = Recents.getSystemServices();
        mRv.getParent().requestDisallowInterceptTouchEvent(true);
        mDragging = true;
        mDragTask = event.task;
@@ -127,7 +129,7 @@ public class RecentsViewTouchHandler {
        mTaskView.setTranslationY(y);

        RecentsConfiguration config = Recents.getConfiguration();
        if (!config.hasDockedTasks) {
        if (!ssp.hasDockedTask()) {
            // Add the dock state drop targets (these take priority)
            TaskStack.DockState[] dockStates = getDockStatesForCurrentOrientation();
            for (TaskStack.DockState dockState : dockStates) {