Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/PreviewPositionHelper.java +7 −25 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ public class PreviewPositionHelper { private boolean mIsOrientationChanged; private SplitBounds mSplitBounds; private int mDesiredStagePosition; private boolean mTaskbarInApp; public Matrix getMatrix() { return mMatrix; Loading @@ -58,10 +57,6 @@ public class PreviewPositionHelper { mDesiredStagePosition = desiredStagePosition; } public void setTaskbarInApp(boolean taskbarInApp) { mTaskbarInApp = taskbarInApp; } /** * Updates the matrix based on the provided parameters */ Loading @@ -79,19 +74,7 @@ public class PreviewPositionHelper { float scaledTaskbarSize; float canvasScreenRatio; if (mSplitBounds != null) { float fullscreenTaskWidth; float fullscreenTaskHeight; float taskPercent; if (mSplitBounds.appsStackedVertically) { taskPercent = mDesiredStagePosition != STAGE_POSITION_TOP_OR_LEFT ? mSplitBounds.topTaskPercent : (1 - (mSplitBounds.topTaskPercent + mSplitBounds.dividerHeightPercent)); // Scale portrait height to that of the actual screen fullscreenTaskHeight = screenHeightPx * taskPercent; if (mTaskbarInApp) { canvasScreenRatio = canvasHeight / fullscreenTaskHeight; } else { if (mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT) { // Top app isn't cropped at all by taskbar canvasScreenRatio = 0; Loading @@ -99,14 +82,13 @@ public class PreviewPositionHelper { // Same as fullscreen ratio canvasScreenRatio = (float) canvasWidth / screenWidthPx; } } } else { // For landscape, scale the width taskPercent = mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT float 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; float fullscreenTaskWidth = screenWidthPx * taskPercent; canvasScreenRatio = canvasWidth / fullscreenTaskWidth; } } else { Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/PreviewPositionHelper.java +7 −25 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ public class PreviewPositionHelper { private boolean mIsOrientationChanged; private SplitBounds mSplitBounds; private int mDesiredStagePosition; private boolean mTaskbarInApp; public Matrix getMatrix() { return mMatrix; Loading @@ -58,10 +57,6 @@ public class PreviewPositionHelper { mDesiredStagePosition = desiredStagePosition; } public void setTaskbarInApp(boolean taskbarInApp) { mTaskbarInApp = taskbarInApp; } /** * Updates the matrix based on the provided parameters */ Loading @@ -79,19 +74,7 @@ public class PreviewPositionHelper { float scaledTaskbarSize; float canvasScreenRatio; if (mSplitBounds != null) { float fullscreenTaskWidth; float fullscreenTaskHeight; float taskPercent; if (mSplitBounds.appsStackedVertically) { taskPercent = mDesiredStagePosition != STAGE_POSITION_TOP_OR_LEFT ? mSplitBounds.topTaskPercent : (1 - (mSplitBounds.topTaskPercent + mSplitBounds.dividerHeightPercent)); // Scale portrait height to that of the actual screen fullscreenTaskHeight = screenHeightPx * taskPercent; if (mTaskbarInApp) { canvasScreenRatio = canvasHeight / fullscreenTaskHeight; } else { if (mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT) { // Top app isn't cropped at all by taskbar canvasScreenRatio = 0; Loading @@ -99,14 +82,13 @@ public class PreviewPositionHelper { // Same as fullscreen ratio canvasScreenRatio = (float) canvasWidth / screenWidthPx; } } } else { // For landscape, scale the width taskPercent = mDesiredStagePosition == STAGE_POSITION_TOP_OR_LEFT float 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; float fullscreenTaskWidth = screenWidthPx * taskPercent; canvasScreenRatio = canvasWidth / fullscreenTaskWidth; } } else { Loading