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

Commit 3bafdba7 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9354090 from ed882317 to tm-qpr2-release

Change-Id: I52fd07310076a24dbbd2afe3543c8fe9fe08c3df
parents 0012eb61 ed882317
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_SPLIT_FROM_WORKSP
import static com.android.launcher3.util.SplitConfigurationOptions.getLogEventForPosition;
import static com.android.quickstep.util.SplitAnimationTimings.TABLET_HOME_TO_SPLIT;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Rect;
@@ -115,13 +117,19 @@ public interface QuickstepSystemShortcut {

            PendingAnimation anim = new PendingAnimation(TABLET_HOME_TO_SPLIT.getDuration());
            RectF startingTaskRect = new RectF();
            FloatingTaskView floatingTaskView = FloatingTaskView.getFloatingTaskView(mTarget,
                    source.view, null /* thumbnail */,
                    source.drawable, startingTaskRect);
            final FloatingTaskView floatingTaskView = FloatingTaskView.getFloatingTaskView(mTarget,
                    source.view, null /* thumbnail */, source.drawable, startingTaskRect);
            floatingTaskView.setAlpha(1);
            floatingTaskView.addStagingAnimation(anim, startingTaskRect, mTempRect,
                    false /* fadeWithThumbnail */, true /* isStagedTask */);
            controller.setFirstFloatingTaskView(floatingTaskView);
            anim.addListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationCancel(Animator animation) {
                    mTarget.getDragLayer().removeView(floatingTaskView);
                    controller.resetState();
                }
            });
            anim.buildAnim().start();
        }
    }
+3 −2
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
        DeviceProfile deviceProfile = mContext.getDeviceProfile();
        Resources resources = mContext.getResources();
        Point p = !mContext.isUserSetupComplete()
                ? new Point(0, resources.getDimensionPixelSize(R.dimen.taskbar_suw_frame))
                ? new Point(0, controllers.taskbarActivityContext.getSetupWindowHeight())
                : DimensionUtils.getTaskbarPhoneDimensions(deviceProfile, resources,
                        TaskbarManager.isPhoneMode(deviceProfile));
        mNavButtonsView.getLayoutParams().height = p.y;
@@ -691,8 +691,9 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
                        (resources.getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size) / 2);
        navButtonsLayoutParams.setMarginEnd(0);
        navButtonsLayoutParams.gravity = Gravity.START;
        mNavButtonsView.getLayoutParams().height =
                mControllers.taskbarActivityContext.getSetupWindowHeight();
        mNavButtonContainer.setLayoutParams(navButtonsLayoutParams);
        mNavButtonContainer.requestLayout();
    }

    /**
+8 −1
Original line number Diff line number Diff line
@@ -341,6 +341,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext {

    public void onConfigurationChanged(@Config int configChanges) {
        mControllers.onConfigurationChanged(configChanges);
        if (!mIsUserSetupComplete) {
            setTaskbarWindowHeight(getSetupWindowHeight());
        }
    }

    public boolean isThreeButtonNav() {
@@ -673,7 +676,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
        }

        if (!isUserSetupComplete()) {
            return resources.getDimensionPixelSize(R.dimen.taskbar_suw_frame);
            return getSetupWindowHeight();
        }

        if (DisplayController.isTransientTaskbar(this)) {
@@ -685,6 +688,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
        return mDeviceProfile.taskbarSize + Math.max(getLeftCornerRadius(), getRightCornerRadius());
    }

    public int getSetupWindowHeight() {
        return getResources().getDimensionPixelSize(R.dimen.taskbar_suw_frame);
    }

    /**
     * Either adds or removes {@link WindowManager.LayoutParams#FLAG_NOT_FOCUSABLE} on the taskbar
     * window.
+2 −1
Original line number Diff line number Diff line
@@ -149,7 +149,8 @@ class TaskbarInsetsController(val context: TaskbarActivityContext): LoggableTask
        if (context.dragLayer.alpha < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD) {
            // Let touches pass through us.
            insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION)
        } else if (controllers.navbarButtonsViewController.isImeVisible) {
        } else if (controllers.navbarButtonsViewController.isImeVisible
                && controllers.taskbarStashController.isStashed()) {
            insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION)
        } else if (!controllers.uiController.isTaskbarTouchable) {
            // Let touches pass through us.
+4 −8
Original line number Diff line number Diff line
@@ -375,11 +375,11 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba

        if (supportsVisualStashing() && hasAnyFlag(FLAGS_REPORT_STASHED_INSETS_TO_APP)) {
            DeviceProfile dp = mActivity.getDeviceProfile();
            if (hasAnyFlag(FLAG_STASHED_IN_APP_SETUP) && dp.isTaskbarPresent && !dp.isLandscape) {
            if (hasAnyFlag(FLAG_STASHED_IN_APP_SETUP) && dp.isTaskbarPresent) {
                // We always show the back button in SUW but in portrait the SUW layout may not
                // be wide enough to support overlapping the nav bar with its content.  For now,
                // just inset by the bar height.
                return mUnstashedHeight;
                // be wide enough to support overlapping the nav bar with its content.
                // We're sending different res values in portrait vs landscape
                return mActivity.getResources().getDimensionPixelSize(R.dimen.taskbar_suw_insets);
            }
            boolean isAnimating = mAnimator != null && mAnimator.isStarted();
            if (!mControllers.stashedHandleViewController.isStashedHandleVisible()
@@ -393,10 +393,6 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
            return mStashedHeight;
        }

        if (!mActivity.isUserSetupComplete()) {
            // Special insets for SUW.
            return mActivity.getResources().getDimensionPixelSize(R.dimen.taskbar_suw_insets);
        }
        return mUnstashedHeight;
    }

Loading