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

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

Merge "Adding dnd to/from freeform workspaces."

parents 5da4347b eca4ab6e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -110,7 +110,8 @@ public class RecentsConfiguration {
    void update(Context context, SystemServicesProxy ssp, Rect windowRect) {
        // Only update resources that can change after the first load, either through developer
        // settings or via multi window
        lockToAppEnabled = ssp.getSystemSetting(context, Settings.System.LOCK_TO_APP_ENABLED) != 0;
        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
+2 −2
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub
        reloadHeaderBarLayout(false /* tryAndBindSearchWidget */);

        // Update the destination rect
        mDummyStackView.updateMinMaxScrollForStack(stack);
        mDummyStackView.updateLayoutForStack(stack);
        final Task toTask = new Task();
        final TaskViewTransform toTransform = getThumbnailTransitionTransform(stack, stackView,
                topTask.id, toTask);
@@ -696,7 +696,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub
        TaskStack stack = sInstanceLoadPlan.getTaskStack();

        // Prepare the dummy stack for the transition
        mDummyStackView.updateMinMaxScrollForStack(stack);
        mDummyStackView.updateLayoutForStack(stack);
        TaskStackLayoutAlgorithm.VisibilityReport stackVr =
                mDummyStackView.computeStackVisibilityReport();
        boolean hasRecentTasks = stack.getTaskCount() > 0;
+3 −3
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ public class EventBus extends BroadcastReceiver {
                InvocationTargetException|
                InstantiationException|
                IllegalAccessException e) {
            Log.e(TAG, "Failed to create InterprocessEvent", e);
            Log.e(TAG, "Failed to create InterprocessEvent", e.getCause());
        }
    }

@@ -746,9 +746,9 @@ public class EventBus extends BroadcastReceiver {
                Log.e(TAG, "Failed to deliver event to null subscriber");
            }
        } catch (IllegalAccessException e) {
            Log.e(TAG, "Failed to invoke method", e);
            Log.e(TAG, "Failed to invoke method", e.getCause());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getCause());
            Log.e(TAG, "Failed to invoke method", e.getCause());
        }
    }

+6 −6
Original line number Diff line number Diff line
@@ -18,18 +18,18 @@ package com.android.systemui.recents.events.ui.dragndrop;

import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.DropTarget;

/**
 * This event is sent when a user drag enters or exits a dock region.
 * This event is sent when a user drags in/out of a drop target.
 */
public class DragDockStateChangedEvent extends EventBus.Event {
public class DragDropTargetChangedEvent extends EventBus.Event {

    public final Task task;
    public final TaskStack.DockState dockState;
    public final DropTarget dropTarget;

    public DragDockStateChangedEvent(Task task, TaskStack.DockState dockState) {
    public DragDropTargetChangedEvent(Task task, DropTarget dropTarget) {
        this.task = task;
        this.dockState = dockState;
        this.dropTarget = dropTarget;
    }
}
+5 −5
Original line number Diff line number Diff line
@@ -19,8 +19,8 @@ package com.android.systemui.recents.events.ui.dragndrop;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.DragView;
import com.android.systemui.recents.views.DropTarget;
import com.android.systemui.recents.views.TaskView;

/**
@@ -31,15 +31,15 @@ public class DragEndEvent extends EventBus.Event {
    public final Task task;
    public final TaskView taskView;
    public final DragView dragView;
    public final TaskStack.DockState dockState;
    public final DropTarget dropTarget;
    public final ReferenceCountedTrigger postAnimationTrigger;

    public DragEndEvent(Task task, TaskView taskView, DragView dragView,
            TaskStack.DockState dockState, ReferenceCountedTrigger postAnimationTrigger) {
    public DragEndEvent(Task task, TaskView taskView, DragView dragView, DropTarget dropTarget,
            ReferenceCountedTrigger postAnimationTrigger) {
        this.task = task;
        this.taskView = taskView;
        this.dragView = dragView;
        this.dockState = dockState;
        this.dropTarget = dropTarget;
        this.postAnimationTrigger = postAnimationTrigger;
    }
}
Loading