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

Commit d759a712 authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Fixing issue where the configuration can have stale docked state.

- Fixing issue where you could not drag after undocking a task while
  Overview is open, since we did not update the docked state.  We can
  just read the state directly in that case.

Change-Id: I5d2844edf024ba379e13be1a625bda8579d971b1
parent 53d5dbac
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) {