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

Commit e317c12c authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Empty motion bounds when PiP bounds changed" into main

parents c786708e b1afc90b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -788,6 +788,7 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
            case PipTransitionState.CHANGED_PIP_BOUNDS:
                // Check whether changed bounds imply we need to update stash state too.
                stashEndActionIfNeeded();
                settlePipBoundsAfterPhysicsAnimation(false /* animatingAfter */);
                break;
        }
    }
+0 −19
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.PIP_ST
import static com.android.wm.shell.common.pip.PipBoundsState.STASH_TYPE_LEFT;
import static com.android.wm.shell.common.pip.PipBoundsState.STASH_TYPE_NONE;
import static com.android.wm.shell.common.pip.PipBoundsState.STASH_TYPE_RIGHT;
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_TO_PIP;
import static com.android.wm.shell.pip2.phone.PhonePipMenuController.MENU_STATE_FULL;
import static com.android.wm.shell.pip2.phone.PhonePipMenuController.MENU_STATE_NONE;
import static com.android.wm.shell.pip2.phone.PipMenuView.ANIM_TYPE_NONE;
@@ -67,8 +66,6 @@ import com.android.wm.shell.common.pip.PipPerfHintController;
import com.android.wm.shell.common.pip.PipUiEventLogger;
import com.android.wm.shell.common.pip.PipUtils;
import com.android.wm.shell.common.pip.SizeSpecSource;
import com.android.wm.shell.pip.PipAnimationController;
import com.android.wm.shell.pip.PipTransitionController;
import com.android.wm.shell.sysui.ShellCommandHandler;
import com.android.wm.shell.sysui.ShellInit;

@@ -303,11 +300,6 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
                });
    }

    public PipTransitionController getTransitionHandler() {
        // return mPipTaskOrganizer.getTransitionController();
        return null;
    }

    private void reloadResources() {
        final Resources res = mContext.getResources();
        mBottomOffsetBufferPx = res.getDimensionPixelSize(R.dimen.pip_bottom_offset_buffer);
@@ -358,17 +350,6 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
        mPipBoundsState.setHasUserResizedPip(false);
    }

    void onPinnedStackAnimationEnded(
            @PipAnimationController.TransitionDirection int direction) {
        // Always synchronize the motion helper bounds once PiP animations finish
        mMotionHelper.synchronizePinnedStackBounds();
        updateMovementBounds();
        if (direction == TRANSITION_DIRECTION_TO_PIP) {
            // Set the initial bounds as the user resize bounds.
            mPipResizeGestureHandler.setUserResizeBounds(mPipBoundsState.getBounds());
        }
    }

    void onConfigurationChanged() {
        mPipResizeGestureHandler.onConfigurationChanged();
        mMotionHelper.synchronizePinnedStackBounds();