Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/PreviewPositionHelper.java +29 −13 Original line number Diff line number Diff line Loading @@ -61,26 +61,42 @@ public class PreviewPositionHelper { * Updates the matrix based on the provided parameters */ public void updateThumbnailMatrix(Rect thumbnailBounds, ThumbnailData thumbnailData, int canvasWidth, int canvasHeight, int screenWidthPx, int taskbarSize, boolean isTablet, int canvasWidth, int canvasHeight, int screenWidthPx, int screenHeightPx, int taskbarSize, boolean isTablet, int currentRotation, boolean isRtl) { boolean isRotated = false; boolean isOrientationDifferent; float fullscreenTaskWidth = screenWidthPx; if (mSplitBounds != null && !mSplitBounds.appsStackedVertically) { int thumbnailRotation = thumbnailData.rotation; int deltaRotate = getRotationDelta(currentRotation, thumbnailRotation); RectF thumbnailClipHint = new RectF(); float scaledTaskbarSize = 0; if (mSplitBounds != null) { float fullscreenTaskWidth; float fullscreenTaskHeight; float canvasScreenRatio; float taskPercent; if (!mSplitBounds.appsStackedVertically) { // For landscape, scale the width float taskPercent = mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT taskPercent = mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT ? mSplitBounds.leftTaskPercent : (1 - (mSplitBounds.leftTaskPercent + mSplitBounds.dividerWidthPercent)); // Scale landscape width to that of actual screen fullscreenTaskWidth = screenWidthPx * taskPercent; canvasScreenRatio = canvasWidth / fullscreenTaskWidth; } else { taskPercent = mDesiredStagePosition != STAGE_POSITION_TOP_OR_LEFT ? mSplitBounds.leftTaskPercent : (1 - (mSplitBounds.leftTaskPercent + mSplitBounds.dividerWidthPercent)); // Scale landscape width to that of actual screen fullscreenTaskHeight = screenHeightPx * taskPercent; canvasScreenRatio = canvasHeight / fullscreenTaskHeight; } int thumbnailRotation = thumbnailData.rotation; int deltaRotate = getRotationDelta(currentRotation, thumbnailRotation); RectF thumbnailClipHint = new RectF(); float canvasScreenRatio = canvasWidth / fullscreenTaskWidth; float scaledTaskbarSize = taskbarSize * canvasScreenRatio; scaledTaskbarSize = taskbarSize * canvasScreenRatio; thumbnailClipHint.bottom = isTablet ? scaledTaskbarSize : 0; } float scale = thumbnailData.scale; final float thumbnailScale; Loading packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionTaskView.kt +2 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 val currentRotation: Int = display.rotation val displayWidthPx = windowMetrics.bounds.width() val displayHeightPx = windowMetrics.bounds.height() val isRtl = layoutDirection == LAYOUT_DIRECTION_RTL val isTablet = isTablet(context) val taskbarSize = Loading @@ -163,6 +164,7 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 measuredWidth, measuredHeight, displayWidthPx, displayHeightPx, taskbarSize, isTablet, currentRotation, Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/PreviewPositionHelper.java +29 −13 Original line number Diff line number Diff line Loading @@ -61,26 +61,42 @@ public class PreviewPositionHelper { * Updates the matrix based on the provided parameters */ public void updateThumbnailMatrix(Rect thumbnailBounds, ThumbnailData thumbnailData, int canvasWidth, int canvasHeight, int screenWidthPx, int taskbarSize, boolean isTablet, int canvasWidth, int canvasHeight, int screenWidthPx, int screenHeightPx, int taskbarSize, boolean isTablet, int currentRotation, boolean isRtl) { boolean isRotated = false; boolean isOrientationDifferent; float fullscreenTaskWidth = screenWidthPx; if (mSplitBounds != null && !mSplitBounds.appsStackedVertically) { int thumbnailRotation = thumbnailData.rotation; int deltaRotate = getRotationDelta(currentRotation, thumbnailRotation); RectF thumbnailClipHint = new RectF(); float scaledTaskbarSize = 0; if (mSplitBounds != null) { float fullscreenTaskWidth; float fullscreenTaskHeight; float canvasScreenRatio; float taskPercent; if (!mSplitBounds.appsStackedVertically) { // For landscape, scale the width float taskPercent = mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT taskPercent = mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT ? mSplitBounds.leftTaskPercent : (1 - (mSplitBounds.leftTaskPercent + mSplitBounds.dividerWidthPercent)); // Scale landscape width to that of actual screen fullscreenTaskWidth = screenWidthPx * taskPercent; canvasScreenRatio = canvasWidth / fullscreenTaskWidth; } else { taskPercent = mDesiredStagePosition != STAGE_POSITION_TOP_OR_LEFT ? mSplitBounds.leftTaskPercent : (1 - (mSplitBounds.leftTaskPercent + mSplitBounds.dividerWidthPercent)); // Scale landscape width to that of actual screen fullscreenTaskHeight = screenHeightPx * taskPercent; canvasScreenRatio = canvasHeight / fullscreenTaskHeight; } int thumbnailRotation = thumbnailData.rotation; int deltaRotate = getRotationDelta(currentRotation, thumbnailRotation); RectF thumbnailClipHint = new RectF(); float canvasScreenRatio = canvasWidth / fullscreenTaskWidth; float scaledTaskbarSize = taskbarSize * canvasScreenRatio; scaledTaskbarSize = taskbarSize * canvasScreenRatio; thumbnailClipHint.bottom = isTablet ? scaledTaskbarSize : 0; } float scale = thumbnailData.scale; final float thumbnailScale; Loading
packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionTaskView.kt +2 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 val currentRotation: Int = display.rotation val displayWidthPx = windowMetrics.bounds.width() val displayHeightPx = windowMetrics.bounds.height() val isRtl = layoutDirection == LAYOUT_DIRECTION_RTL val isTablet = isTablet(context) val taskbarSize = Loading @@ -163,6 +164,7 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 measuredWidth, measuredHeight, displayWidthPx, displayHeightPx, taskbarSize, isTablet, currentRotation, Loading