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

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

Snap for 7566880 from 56c33c3c to sc-release

Change-Id: I8d1c2ebee9c6bce87f79f9a3538f0806885a4741
parents 76a4d122 56c33c3c
Loading
Loading
Loading
Loading
+20 −8
Original line number Original line Diff line number Diff line
@@ -266,20 +266,32 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
        Gravity.apply(Gravity.CENTER, outWidth, outHeight, potentialTaskRect, outRect);
        Gravity.apply(Gravity.CENTER, outWidth, outHeight, potentialTaskRect, outRect);
    }
    }


    private PointF getTaskDimension(Context context, DeviceProfile dp) {
    private static PointF getTaskDimension(Context context, DeviceProfile dp) {
        PointF dimension = new PointF();
        PointF dimension = new PointF();
        getTaskDimension(context, dp, dimension);
        return dimension;
    }

    /**
     * Gets the dimension of the task in the current system state.
     */
    public static void getTaskDimension(Context context, DeviceProfile dp, PointF out) {
        if (dp.isMultiWindowMode) {
        if (dp.isMultiWindowMode) {
            WindowBounds bounds = SplitScreenBounds.INSTANCE.getSecondaryWindowBounds(context);
            WindowBounds bounds = SplitScreenBounds.INSTANCE.getSecondaryWindowBounds(context);
            dimension.x = bounds.availableSize.x;
            if (TaskView.CLIP_STATUS_AND_NAV_BARS) {
            dimension.y = bounds.availableSize.y;
                out.x = bounds.availableSize.x;
                out.y = bounds.availableSize.y;
            } else {
                out.x = bounds.availableSize.x + bounds.insets.left + bounds.insets.right;
                out.y = bounds.availableSize.y + bounds.insets.top + bounds.insets.bottom;
            }
        } else if (TaskView.CLIP_STATUS_AND_NAV_BARS) {
        } else if (TaskView.CLIP_STATUS_AND_NAV_BARS) {
            dimension.x = dp.availableWidthPx;
            out.x = dp.availableWidthPx;
            dimension.y = dp.availableHeightPx;
            out.y = dp.availableHeightPx;
        } else {
        } else {
            dimension.x = dp.widthPx;
            out.x = dp.widthPx;
            dimension.y = dp.heightPx;
            out.y = dp.heightPx;
        }
        }
        return dimension;
    }
    }


    /**
    /**
+2 −7
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ import static android.view.Surface.ROTATION_90;
import static com.android.launcher3.states.RotationHelper.ALLOW_ROTATION_PREFERENCE_KEY;
import static com.android.launcher3.states.RotationHelper.ALLOW_ROTATION_PREFERENCE_KEY;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.launcher3.util.SettingsCache.ROTATION_SETTING_URI;
import static com.android.launcher3.util.SettingsCache.ROTATION_SETTING_URI;
import static com.android.quickstep.BaseActivityInterface.getTaskDimension;


import static java.lang.annotation.RetentionPolicy.SOURCE;
import static java.lang.annotation.RetentionPolicy.SOURCE;


@@ -49,7 +50,6 @@ import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.SettingsCache;
import com.android.launcher3.util.SettingsCache;
import com.android.launcher3.util.WindowBounds;
import com.android.quickstep.BaseActivityInterface;
import com.android.quickstep.BaseActivityInterface;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.views.TaskView;
import com.android.quickstep.views.TaskView;
@@ -401,12 +401,7 @@ public class RecentsOrientedState implements
            fullHeight -= insets.top + insets.bottom;
            fullHeight -= insets.top + insets.bottom;
        }
        }


        if (dp.isMultiWindowMode) {
        getTaskDimension(mContext, dp, outPivot);
            WindowBounds bounds = SplitScreenBounds.INSTANCE.getSecondaryWindowBounds(mContext);
            outPivot.set(bounds.availableSize.x, bounds.availableSize.y);
        } else {
            outPivot.set(fullWidth, fullHeight);
        }
        float scale = Math.min(outPivot.x / taskView.width(), outPivot.y / taskView.height());
        float scale = Math.min(outPivot.x / taskView.width(), outPivot.y / taskView.height());
        // We also scale the preview as part of fullScreenParams, so account for that as well.
        // We also scale the preview as part of fullScreenParams, so account for that as well.
        if (fullWidth > 0) {
        if (fullWidth > 0) {
+1 −9
Original line number Original line Diff line number Diff line
@@ -278,12 +278,7 @@ public class RecyclerViewFastScroller extends View {
                mIgnoreDragGesture |= absDeltaY > mConfig.getScaledPagingTouchSlop();
                mIgnoreDragGesture |= absDeltaY > mConfig.getScaledPagingTouchSlop();


                if (!mIsDragging && !mIgnoreDragGesture && mRv.supportsFastScrolling()) {
                if (!mIsDragging && !mIgnoreDragGesture && mRv.supportsFastScrolling()) {
                    // condition #1: triggering thumb is distance, angle based
                    if ((isNearThumb(mDownX, mLastY) && ev.getEventTime() - mDownTimeStampMillis
                    if ((isNearThumb(mDownX, mLastY)
                            && absDeltaY > mConfig.getScaledPagingTouchSlop()
                            && absDeltaY > absDeltaX)
                            // condition#2: Fastscroll function is now time based
                            || (isNearScrollBar(mDownX) && ev.getEventTime() - mDownTimeStampMillis
                                    > FASTSCROLL_THRESHOLD_MILLIS)) {
                                    > FASTSCROLL_THRESHOLD_MILLIS)) {
                        calcTouchOffsetAndPrepToFastScroll(mDownY, mLastY);
                        calcTouchOffsetAndPrepToFastScroll(mDownY, mLastY);
                    }
                    }
@@ -433,9 +428,6 @@ public class RecyclerViewFastScroller extends View {
    }
    }


    private void updatePopupY(int lastTouchY) {
    private void updatePopupY(int lastTouchY) {
        if (!mPopupVisible) {
            return;
        }
        int height = mPopupView.getHeight();
        int height = mPopupView.getHeight();
        // Aligns the rounded corner of the pop up with the top of the thumb.
        // Aligns the rounded corner of the pop up with the top of the thumb.
        float top = mRv.getScrollBarTop() + lastTouchY + (getScrollThumbRadius() / 2f)
        float top = mRv.getScrollBarTop() + lastTouchY + (getScrollThumbRadius() / 2f)
+0 −1
Original line number Original line Diff line number Diff line
@@ -85,7 +85,6 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView
        setBackgroundResource(R.drawable.pending_widget_bg);
        setBackgroundResource(R.drawable.pending_widget_bg);
        setWillNotDraw(false);
        setWillNotDraw(false);


        setElevation(getResources().getDimension(R.dimen.pending_widget_elevation));
        updateAppWidget(null);
        updateAppWidget(null);
        setOnClickListener(ItemClickHandler.INSTANCE);
        setOnClickListener(ItemClickHandler.INSTANCE);