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

Commit b0d7023f authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6761348 from c6cf6ba1 to rvc-qpr1-release

Change-Id: I3dcb5699e38094b12a6f33d8131785c1e2845e93
parents aa26b424 c6cf6ba1
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -4420,15 +4420,12 @@ message PrivacyIndicatorsInteracted {
        UNKNOWN = 0;
        CHIP_VIEWED = 1;
        CHIP_CLICKED = 2;
        DIALOG_PRIVACY_SETTINGS = 3;
        reserved 3; // Used only in beta builds, never shipped 
        DIALOG_DISMISS = 4;
        DIALOG_LINE_ITEM = 5;
    }

    optional Type type = 1 [(state_field_option).exclusive_state = true];

    // Used if the type is LINE_ITEM
    optional string package_name = 2;
}

/**
+1 −1
Original line number Diff line number Diff line
@@ -448,8 +448,8 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
                                if (DEBUG) Log.d(LOG_TAG, "verifyPasswordAndUnlock "
                                        + " UpdateSim.onSimCheckResponse: "
                                        + " attemptsRemaining=" + result.getAttemptsRemaining());
                                mStateMachine.reset();
                            }
                            mStateMachine.reset();
                            mCheckSimPukThread = null;
                        }
                    });
+1 −6
Original line number Diff line number Diff line
@@ -377,12 +377,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
     * Update the bounds used to save the re-entry size and snap fraction when exiting PIP.
     */
    public void updateReentryBounds() {
        // On phones, the expansion animation that happens on pip tap before restoring
        // to fullscreen makes it so that the last reported bounds are the expanded
        // bounds. We want to restore to the unexpanded bounds when re-entering pip,
        // so we use the bounds before expansion (normal) instead of the reported
        // bounds.
        Rect reentryBounds = mTouchHandler.getNormalBounds();
        final Rect reentryBounds = mTouchHandler.getUserResizeBounds();
        // Apply the snap fraction of the current bounds to the normal bounds.
        final Rect bounds = mPipTaskOrganizer.getLastReportedBounds();
        float snapFraction = mPipBoundsHandler.getSnapFraction(bounds);
+11 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ public class PipResizeGestureHandler {
    private final Point mMaxSize = new Point();
    private final Point mMinSize = new Point();
    private final Rect mLastResizeBounds = new Rect();
    private final Rect mUserResizeBounds = new Rect();
    private final Rect mLastDownBounds = new Rect();
    private final Rect mDragCornerSize = new Rect();
    private final Rect mTmpTopLeftCorner = new Rect();
@@ -185,6 +186,7 @@ public class PipResizeGestureHandler {

    void onActivityUnpinned() {
        mIsAttached = false;
        mUserResizeBounds.setEmpty();
        updateIsEnabled();
    }

@@ -333,6 +335,7 @@ public class PipResizeGestureHandler {
                case MotionEvent.ACTION_UP:
                case MotionEvent.ACTION_CANCEL:
                    if (!mLastResizeBounds.isEmpty()) {
                        mUserResizeBounds.set(mLastResizeBounds);
                        mPipTaskOrganizer.scheduleFinishResizePip(mLastResizeBounds,
                                (Rect bounds) -> {
                                    new Handler(Looper.getMainLooper()).post(() -> {
@@ -357,6 +360,14 @@ public class PipResizeGestureHandler {
        mThresholdCrossed = false;
    }

    void setUserResizeBounds(Rect bounds) {
        mUserResizeBounds.set(bounds);
    }

    Rect getUserResizeBounds() {
        return mUserResizeBounds;
    }

    void updateMaxSize(int maxX, int maxY) {
        mMaxSize.set(maxX, maxY);
    }
+7 −10
Original line number Diff line number Diff line
@@ -133,9 +133,6 @@ public class PipTouchHandler {

    // The current movement bounds
    private Rect mMovementBounds = new Rect();
    // The current resized bounds, changed by user resize.
    // This is used during expand/un-expand to save/restore the user's resized size.
    @VisibleForTesting Rect mResizedBounds = new Rect();

    // The reference inset bounds, used to determine the dismiss fraction
    private Rect mInsetBounds = new Rect();
@@ -376,7 +373,6 @@ public class PipTouchHandler {

            mFloatingContentCoordinator.onContentRemoved(mMotionHelper);
        }
        mResizedBounds.setEmpty();
        mPipResizeGestureHandler.onActivityUnpinned();
    }

@@ -386,9 +382,8 @@ public class PipTouchHandler {
        mMotionHelper.synchronizePinnedStackBounds();
        updateMovementBounds();
        if (direction == TRANSITION_DIRECTION_TO_PIP) {
            // updates mResizedBounds only if it's an entering PiP animation
            // mResized should be otherwise updated in setMenuState.
            mResizedBounds.set(mMotionHelper.getBounds());
            // Set the initial bounds as the user resize bounds.
            mPipResizeGestureHandler.setUserResizeBounds(mMotionHelper.getBounds());
        }

        if (mShowPipMenuOnAnimationEnd) {
@@ -801,9 +796,7 @@ public class PipTouchHandler {
            // Save the current snap fraction and if we do not drag or move the PiP, then
            // we store back to this snap fraction.  Otherwise, we'll reset the snap
            // fraction and snap to the closest edge.
            // Also save the current resized bounds so when the menu disappears, we can restore it.
            if (resize) {
                mResizedBounds.set(mMotionHelper.getBounds());
                Rect expandedBounds = new Rect(mExpandedBounds);
                mSavedSnapFraction = mMotionHelper.animateToExpandedState(expandedBounds,
                        mMovementBounds, mExpandedMovementBounds, callback);
@@ -832,7 +825,7 @@ public class PipTouchHandler {
                }

                if (mDeferResizeToNormalBoundsUntilRotation == -1) {
                    Rect restoreBounds = new Rect(mResizedBounds);
                    Rect restoreBounds = new Rect(getUserResizeBounds());
                    Rect restoredMovementBounds = new Rect();
                    mSnapAlgorithm.getMovementBounds(restoreBounds, mInsetBounds,
                            restoredMovementBounds, mIsImeShowing ? mImeHeight : 0);
@@ -885,6 +878,10 @@ public class PipTouchHandler {
        return mNormalBounds;
    }

    Rect getUserResizeBounds() {
        return mPipResizeGestureHandler.getUserResizeBounds();
    }

    /**
     * Gesture controlling normal movement of the PIP.
     */
Loading