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

Commit ae567f96 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Merging from ub-launcher3-master @ build 6952418

Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6952418.html

Change-Id: Id8ec665ff7be486b794807f6524e385728ea7717
parents b0f897cd feefa117
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -10,4 +10,4 @@ PROTOBUF_CLASS_PATH=com.google.protobuf:protobuf-gradle-plugin:0.8.8
PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7
PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7


BUILD_TOOLS_VERSION=28.0.3
BUILD_TOOLS_VERSION=28.0.3
COMPILE_SDK=android-R
COMPILE_SDK=android-S
+1 −10
Original line number Original line Diff line number Diff line
@@ -41,10 +41,8 @@ import static com.android.quickstep.GestureState.STATE_END_TARGET_ANIMATION_FINI
import static com.android.quickstep.GestureState.STATE_END_TARGET_SET;
import static com.android.quickstep.GestureState.STATE_END_TARGET_SET;
import static com.android.quickstep.GestureState.STATE_RECENTS_SCROLLING_FINISHED;
import static com.android.quickstep.GestureState.STATE_RECENTS_SCROLLING_FINISHED;
import static com.android.quickstep.MultiStateCallback.DEBUG_STATES;
import static com.android.quickstep.MultiStateCallback.DEBUG_STATES;
import static com.android.quickstep.TaskUtils.taskIsATargetWithMode;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;


import android.animation.Animator;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorListenerAdapter;
@@ -1483,13 +1481,11 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
                mRecentsAnimationTargets.apps,
                mRecentsAnimationTargets.apps,
                mRecentsAnimationTargets.apps.length + 1);
                mRecentsAnimationTargets.apps.length + 1);
        apps[apps.length - 1] = appearedTaskTarget;
        apps[apps.length - 1] = appearedTaskTarget;
        boolean launcherClosing =
                taskIsATargetWithMode(apps, mActivity.getTaskId(), MODE_CLOSING);


        AnimatorSet anim = new AnimatorSet();
        AnimatorSet anim = new AnimatorSet();
        TaskViewUtils.composeRecentsLaunchAnimator(
        TaskViewUtils.composeRecentsLaunchAnimator(
                anim, taskView, apps,
                anim, taskView, apps,
                mRecentsAnimationTargets.wallpapers, launcherClosing,
                mRecentsAnimationTargets.wallpapers, true /* launcherClosing */,
                mActivity.getStateManager(), mRecentsView,
                mActivity.getStateManager(), mRecentsView,
                mActivityInterface.getDepthController());
                mActivityInterface.getDepthController());
        anim.addListener(new AnimatorListenerAdapter(){
        anim.addListener(new AnimatorListenerAdapter(){
@@ -1557,11 +1553,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
        mGestureEndCallback = gestureEndCallback;
        mGestureEndCallback = gestureEndCallback;
    }
    }


    @Override
    public long getStartTouchTime() {
        return mTouchTimeMs;
    }

    protected void linkRecentsViewScroll() {
    protected void linkRecentsViewScroll() {
        SurfaceTransactionApplier.create(mRecentsView, applier -> {
        SurfaceTransactionApplier.create(mRecentsView, applier -> {
            mTransformParams.setSyncTransactionApplier(applier);
            mTransformParams.setSyncTransactionApplier(applier);
+11 −0
Original line number Original line Diff line number Diff line
@@ -142,6 +142,9 @@ public class GestureState implements RecentsAnimationCallbacks.RecentsAnimationL
    private Set<Integer> mPreviouslyAppearedTaskIds = new HashSet<>();
    private Set<Integer> mPreviouslyAppearedTaskIds = new HashSet<>();
    private int mLastStartedTaskId = -1;
    private int mLastStartedTaskId = -1;


    /** The time when the swipe up gesture is triggered. */
    private long mSwipeUpStartTimeMs;

    public GestureState(OverviewComponentObserver componentObserver, int gestureId) {
    public GestureState(OverviewComponentObserver componentObserver, int gestureId) {
        mHomeIntent = componentObserver.getHomeIntent();
        mHomeIntent = componentObserver.getHomeIntent();
        mOverviewIntent = componentObserver.getOverviewIntent();
        mOverviewIntent = componentObserver.getOverviewIntent();
@@ -343,6 +346,14 @@ public class GestureState implements RecentsAnimationCallbacks.RecentsAnimationL
        mStateCallback.setState(STATE_RECENTS_ANIMATION_ENDED);
        mStateCallback.setState(STATE_RECENTS_ANIMATION_ENDED);
    }
    }


    void setSwipeUpStartTimeMs(long uptimeMs) {
        mSwipeUpStartTimeMs = uptimeMs;
    }

    long getSwipeUpStartTimeMs() {
        return mSwipeUpStartTimeMs;
    }

    public void dump(PrintWriter pw) {
    public void dump(PrintWriter pw) {
        pw.println("GestureState:");
        pw.println("GestureState:");
        pw.println("  gestureID=" + mGestureId);
        pw.println("  gestureID=" + mGestureId);
+0 −7
Original line number Original line Diff line number Diff line
@@ -160,12 +160,5 @@ public class RecentsAnimationCallbacks implements
         * Callback made when a task started from the recents is ready for an app transition.
         * Callback made when a task started from the recents is ready for an app transition.
         */
         */
        default void onTaskAppeared(RemoteAnimationTargetCompat appearedTaskTarget) {}
        default void onTaskAppeared(RemoteAnimationTargetCompat appearedTaskTarget) {}

        /**
         * The time in milliseconds of the touch event that starts the recents animation.
         */
        default long getStartTouchTime() {
            return 0;
        }
    }
    }
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -119,7 +119,7 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
                }
                }
            }
            }
        });
        });
        final long eventTime = listener.getStartTouchTime();
        final long eventTime = gestureState.getSwipeUpStartTimeMs();
        mCallbacks.addListener(gestureState);
        mCallbacks.addListener(gestureState);
        mCallbacks.addListener(listener);
        mCallbacks.addListener(listener);
        UI_HELPER_EXECUTOR.execute(() -> ActivityManagerWrapper.getInstance()
        UI_HELPER_EXECUTOR.execute(() -> ActivityManagerWrapper.getInstance()
Loading