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

Commit 6348b712 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Animation for docking task gesture" into nyc-dev

parents c48b082d 899327f5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -307,6 +307,9 @@
    <!-- The padding between freeform workspace tasks -->
    <dimen name="recents_freeform_workspace_task_padding">8dp</dimen>

    <!-- The offsets the tasks animate from when recents is launched while docking -->
    <dimen name="recents_task_view_launched_while_docking_offset">144dp</dimen>

    <!-- Space reserved for the cards behind the top card in the bottom stack -->
    <dimen name="bottom_stack_peek_amount">12dp</dimen>

+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.systemui.recents;

import android.graphics.Rect;

/**
 * Due to the fact that RecentsActivity is per-user, we need to establish an
 * interface (this) for the non-system user to register itself for callbacks and to
@@ -27,6 +29,6 @@ oneway interface IRecentsSystemUserCallbacks {
    void updateRecentsVisibility(boolean visible);
    void startScreenPinning();
    void sendRecentsDrawnEvent();
    void sendDockingTopTaskEvent(int dragMode);
    void sendDockingTopTaskEvent(int dragMode, in Rect initialRect);
    void sendLaunchRecentsEvent();
}
+4 −3
Original line number Diff line number Diff line
@@ -43,7 +43,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.DockingTopTaskEvent;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
import com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent;
import com.android.systemui.recents.events.component.ScreenPinningRequestEvent;
@@ -577,14 +577,15 @@ public class Recents extends SystemUI
        }
    }

    public final void onBusEvent(final DockingTopTaskEvent event) {
    public final void onBusEvent(final DockedTopTaskEvent event) {
        int processUser = sSystemServicesProxy.getProcessUser();
        if (!sSystemServicesProxy.isSystemUser(processUser)) {
            postToSystemUser(new Runnable() {
                @Override
                public void run() {
                    try {
                        mUserToSystemCallbacks.sendDockingTopTaskEvent(event.dragMode);
                        mUserToSystemCallbacks.sendDockingTopTaskEvent(event.dragMode,
                                event.initialRect);
                    } catch (RemoteException e) {
                        Log.e(TAG, "Callback failed", e);
                    }
+2 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.SystemUIApplication;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.DockingTopTaskEvent;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
import com.android.systemui.recents.events.activity.EnterRecentsWindowLastAnimationFrameEvent;
import com.android.systemui.recents.events.activity.HideRecentsEvent;
import com.android.systemui.recents.events.activity.IterateRecentsEvent;
@@ -66,7 +66,6 @@ import com.android.systemui.recents.model.RecentsTaskLoader;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.model.TaskGrouping;
import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.tv.views.TaskStackHorizontalGridView;
import com.android.systemui.recents.views.TaskStackLayoutAlgorithm;
import com.android.systemui.recents.views.TaskStackView;
import com.android.systemui.recents.views.TaskStackViewScroller;
@@ -569,7 +568,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        // Make sure we inform DividerView before we actually start the activity so we can change
        // the resize mode already.
        if (ssp.moveTaskToDockedStack(topTaskId, stackCreateMode, initialBounds)) {
            EventBus.getDefault().send(new DockingTopTaskEvent(dragMode));
            EventBus.getDefault().send(new DockedTopTaskEvent(dragMode, initialBounds));
            showRecents(
                    false /* triggeredFromAltTab */,
                    dragMode == NavigationBarGestureHelper.DRAG_MODE_RECENTS,
+4 −3
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.recents;

import android.content.Context;
import android.graphics.Rect;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.EventLog;
@@ -26,7 +27,7 @@ import android.util.SparseArray;
import com.android.systemui.EventLogConstants;
import com.android.systemui.EventLogTags;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.DockingTopTaskEvent;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
import com.android.systemui.recents.events.ui.RecentsDrawnEvent;

@@ -91,8 +92,8 @@ public class RecentsSystemUser extends IRecentsSystemUserCallbacks.Stub {
    }

    @Override
    public void sendDockingTopTaskEvent(int dragMode) throws RemoteException {
        EventBus.getDefault().post(new DockingTopTaskEvent(dragMode));
    public void sendDockingTopTaskEvent(int dragMode, Rect initialRect) throws RemoteException {
        EventBus.getDefault().post(new DockedTopTaskEvent(dragMode, initialRect));
    }

    @Override
Loading