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

Commit 8977440c authored by Winson's avatar Winson Committed by android-build-merger
Browse files

Merge changes If7b8ed3f,I309c3825,Iafd06419,I59f73caf into nyc-dev am: bd1708a1 am: 221240d7

am: 9814d5e6

* commit '9814d5e6':
  Fixes several animation issues related to a dismissing task.
  Pipe the dismiss button logic through the touch handler.
  Skip scroll-to animation when undocking and there are no tasks.
  Fixing issue with docking being disallowed for secondary user.

Change-Id: I84d308bbf3d8cb4656539eaa65b1c7af99fcbed0
parents 3223b909 9814d5e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ public class DividerSnapAlgorithm {
        return new DividerSnapAlgorithm(ctx.getResources(),
                displayInfo.logicalWidth, displayInfo.logicalHeight,
                dividerWindowWidth - 2 * dividerInsets,
                ctx.getResources().getConfiguration().orientation
                ctx.getApplicationContext().getResources().getConfiguration().orientation
                        == Configuration.ORIENTATION_PORTRAIT,
                insets);
    }
+3 −1
Original line number Diff line number Diff line
@@ -451,11 +451,13 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD

        TaskStack stack = loadPlan.getTaskStack();
        int numStackTasks = stack.getStackTaskCount();
        boolean showDeferredAnimation = numStackTasks > 0;

        EventBus.getDefault().send(new ConfigurationChangedEvent(true /* fromMultiWindow */,
                false /* fromDeviceOrientationChange */, false /* fromDisplayDensityChange */,
                numStackTasks > 0));
        EventBus.getDefault().send(new MultiWindowStateChangedEvent(isInMultiWindowMode, stack));
        EventBus.getDefault().send(new MultiWindowStateChangedEvent(isInMultiWindowMode,
                showDeferredAnimation, stack));
    }

    @Override
+5 −1
Original line number Diff line number Diff line
@@ -25,10 +25,14 @@ import com.android.systemui.recents.model.TaskStack;
public class MultiWindowStateChangedEvent extends EventBus.AnimatedEvent {

    public final boolean inMultiWindow;
    // This flag is only used when undocking a task
    public final boolean showDeferredAnimation;
    public final TaskStack stack;

    public MultiWindowStateChangedEvent(boolean inMultiWindow, TaskStack stack) {
    public MultiWindowStateChangedEvent(boolean inMultiWindow, boolean showDeferredAnimation,
            TaskStack stack) {
        this.inMultiWindow = inMultiWindow;
        this.showDeferredAnimation = showDeferredAnimation;
        this.stack = stack;
    }
}
+4 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.systemui.recents.events.ui;

import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.views.AnimationProps;
import com.android.systemui.recents.views.TaskView;

/**
@@ -27,9 +28,11 @@ public class TaskViewDismissedEvent extends EventBus.Event {

    public final Task task;
    public final TaskView taskView;
    public final AnimationProps animation;

    public TaskViewDismissedEvent(Task task, TaskView taskView) {
    public TaskViewDismissedEvent(Task task, TaskView taskView, AnimationProps animation) {
        this.task = task;
        this.taskView = taskView;
        this.animation = animation;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ public class RecentsViewTouchHandler {
    }

    public final void onBusEvent(ConfigurationChangedEvent event) {
        if (event.fromDisplayDensityChange) {
        if (event.fromDisplayDensityChange || event.fromDeviceOrientationChange) {
            updateSnapAlgorithm();
        }
    }
Loading