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

Commit 9b0a75b7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix issues with recents with floating nav bar" into ub-launcher3-master

parents 2f979d26 afd8392b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ import android.os.Handler;
import android.os.Looper;
import android.view.View;

import com.android.launcher3.BaseActivity;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
@@ -194,7 +193,7 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
            int topMargin = context.getResources()
                    .getDimensionPixelSize(R.dimen.task_thumbnail_top_margin);
            int paddingTop = targetRect.rect.top - topMargin - dp.getInsets().top;
            int paddingBottom = dp.availableHeightPx + dp.getInsets().top - targetRect.rect.bottom;
            int paddingBottom = dp.heightPx - dp.getInsets().bottom - targetRect.rect.bottom;

            return FastOverviewState.OVERVIEW_TRANSLATION_FACTOR * (paddingBottom - paddingTop);
        }
+10 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import static com.android.quickstep.QuickScrubController.QUICK_SWITCH_FROM_APP_S
import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL;
import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
@@ -1028,10 +1029,17 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {

        mRecentsView.animateUpRunningTaskIconScale();
        if (mQuickScrubController.isQuickSwitch()) {
            // Adjust the running task so that it is centered and fills the screen.
            TaskView runningTask = mRecentsView.getRunningTaskView();
            if (runningTask != null) {
                runningTask.setTranslationY(-mActivity.getResources().getDimension(
                        R.dimen.task_thumbnail_half_top_margin) * 1f / mRecentsView.getScaleX());
                float insetHeight = mDp.heightPx - mDp.getInsets().top - mDp.getInsets().bottom;
                // Usually insetDiff will be 0, unless we allow apps to draw under the insets. In
                // that case (insetDiff != 0), we need to center in the system-specified available
                // height rather than launcher's inset height by adding half the insetDiff.
                float insetDiff = mDp.availableHeightPx - insetHeight;
                float topMargin = mActivity.getResources().getDimension(
                        R.dimen.task_thumbnail_half_top_margin);
                runningTask.setTranslationY((insetDiff / 2 - topMargin) / mRecentsView.getScaleX());
            }
        }
        RecentsModel.INSTANCE.get(mContext).onOverviewShown(false, TAG);
+4 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
import static com.android.quickstep.WindowTransformSwipeHandler.MIN_PROGRESS_FOR_OVERVIEW;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.LayoutTransition;
@@ -60,6 +61,7 @@ import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ListView;
import androidx.annotation.Nullable;

import com.android.launcher3.BaseActivity;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Insettable;
@@ -545,8 +547,8 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
        // Keep this logic in sync with ActivityControlHelper.getTranslationYForQuickScrub.
        mTempRect.top -= mTaskTopMargin;
        setPadding(mTempRect.left - mInsets.left, mTempRect.top - mInsets.top,
                dp.availableWidthPx + mInsets.left - mTempRect.right,
                dp.availableHeightPx + mInsets.top - mTempRect.bottom);
                dp.widthPx - mInsets.right - mTempRect.right,
                dp.heightPx - mInsets.bottom - mTempRect.bottom);
    }

    protected abstract void getTaskSize(DeviceProfile dp, Rect outRect);