Loading quickstep/src/com/android/quickstep/views/RecentsView.java +4 −4 Original line number Diff line number Diff line Loading @@ -3016,6 +3016,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T @SuppressWarnings("WrongCall") private void onEnd(boolean success) { // Reset task translations as they may have updated via animations in // createTaskDismissAnimation resetTaskVisuals(); if (success) { if (shouldRemoveTask) { if (dismissedTaskView.getTask() != null) { Loading @@ -3032,10 +3036,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } } // Reset task translations as they may have updated via animations in // createTaskDismissAnimation resetTaskVisuals(); int pageToSnapTo = mCurrentPage; mCurrentPageScrollDiff = 0; int taskViewIdToSnapTo = -1; Loading src/com/android/launcher3/touch/PortraitPagedViewHandler.java +9 −14 Original line number Diff line number Diff line Loading @@ -451,24 +451,19 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler { public void setSplitTaskSwipeRect(DeviceProfile dp, Rect outRect, StagedSplitBounds splitInfo, int desiredStagePosition) { boolean isLandscape = dp.isLandscape; float verticalDividerDiff = splitInfo.visualDividerBounds.height() / 2f; float horizontalDividerDiff = splitInfo.visualDividerBounds.width() / 2f; float diff; if (desiredStagePosition == SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT) { if (isLandscape) { diff = outRect.width() * (1f - splitInfo.leftTaskPercent) + horizontalDividerDiff; outRect.right -= diff; outRect.right = outRect.left + (int) (outRect.width() * splitInfo.leftTaskPercent); } else { diff = outRect.height() * (1f - splitInfo.topTaskPercent) + verticalDividerDiff; outRect.bottom -= diff; outRect.bottom = outRect.top + (int) (outRect.height() * splitInfo.topTaskPercent); } } else { if (isLandscape) { diff = outRect.width() * splitInfo.leftTaskPercent + horizontalDividerDiff; outRect.left += diff; outRect.left += (int) (outRect.width() * (splitInfo.leftTaskPercent + splitInfo.dividerWidthPercent)); } else { diff = outRect.height() * splitInfo.topTaskPercent + verticalDividerDiff; outRect.top += diff; outRect.top += (int) (outRect.height() * (splitInfo.topTaskPercent + splitInfo.dividerHeightPercent)); } } } Loading @@ -479,9 +474,9 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler { StagedSplitBounds splitBoundsConfig, DeviceProfile dp) { int spaceAboveSnapshot = dp.overviewTaskThumbnailTopMarginPx; int totalThumbnailHeight = parentHeight - spaceAboveSnapshot; int dividerBar = (splitBoundsConfig.appsStackedVertically ? splitBoundsConfig.visualDividerBounds.height() : splitBoundsConfig.visualDividerBounds.width()); int dividerBar = splitBoundsConfig.appsStackedVertically ? (int) (splitBoundsConfig.dividerHeightPercent * parentHeight) : (int) (splitBoundsConfig.dividerWidthPercent * parentWidth); int primarySnapshotHeight; int primarySnapshotWidth; int secondarySnapshotHeight; Loading src/com/android/launcher3/util/SplitConfigurationOptions.java +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public final class SplitConfigurationOptions { // This class is orientation-agnostic, so we compute both for later use public final float topTaskPercent; public final float leftTaskPercent; public final float dividerWidthPercent; public final float dividerHeightPercent; /** * If {@code true}, that means at the time of creation of this object, the * split-screened apps were vertically stacked. This is useful in scenarios like Loading Loading @@ -130,6 +132,8 @@ public final class SplitConfigurationOptions { leftTaskPercent = this.leftTopBounds.width() / (float) rightBottomBounds.right; topTaskPercent = this.leftTopBounds.height() / (float) rightBottomBounds.bottom; dividerWidthPercent = visualDividerBounds.width() / (float) rightBottomBounds.right; dividerHeightPercent = visualDividerBounds.height() / (float) rightBottomBounds.bottom; } } Loading Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +4 −4 Original line number Diff line number Diff line Loading @@ -3016,6 +3016,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T @SuppressWarnings("WrongCall") private void onEnd(boolean success) { // Reset task translations as they may have updated via animations in // createTaskDismissAnimation resetTaskVisuals(); if (success) { if (shouldRemoveTask) { if (dismissedTaskView.getTask() != null) { Loading @@ -3032,10 +3036,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } } // Reset task translations as they may have updated via animations in // createTaskDismissAnimation resetTaskVisuals(); int pageToSnapTo = mCurrentPage; mCurrentPageScrollDiff = 0; int taskViewIdToSnapTo = -1; Loading
src/com/android/launcher3/touch/PortraitPagedViewHandler.java +9 −14 Original line number Diff line number Diff line Loading @@ -451,24 +451,19 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler { public void setSplitTaskSwipeRect(DeviceProfile dp, Rect outRect, StagedSplitBounds splitInfo, int desiredStagePosition) { boolean isLandscape = dp.isLandscape; float verticalDividerDiff = splitInfo.visualDividerBounds.height() / 2f; float horizontalDividerDiff = splitInfo.visualDividerBounds.width() / 2f; float diff; if (desiredStagePosition == SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT) { if (isLandscape) { diff = outRect.width() * (1f - splitInfo.leftTaskPercent) + horizontalDividerDiff; outRect.right -= diff; outRect.right = outRect.left + (int) (outRect.width() * splitInfo.leftTaskPercent); } else { diff = outRect.height() * (1f - splitInfo.topTaskPercent) + verticalDividerDiff; outRect.bottom -= diff; outRect.bottom = outRect.top + (int) (outRect.height() * splitInfo.topTaskPercent); } } else { if (isLandscape) { diff = outRect.width() * splitInfo.leftTaskPercent + horizontalDividerDiff; outRect.left += diff; outRect.left += (int) (outRect.width() * (splitInfo.leftTaskPercent + splitInfo.dividerWidthPercent)); } else { diff = outRect.height() * splitInfo.topTaskPercent + verticalDividerDiff; outRect.top += diff; outRect.top += (int) (outRect.height() * (splitInfo.topTaskPercent + splitInfo.dividerHeightPercent)); } } } Loading @@ -479,9 +474,9 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler { StagedSplitBounds splitBoundsConfig, DeviceProfile dp) { int spaceAboveSnapshot = dp.overviewTaskThumbnailTopMarginPx; int totalThumbnailHeight = parentHeight - spaceAboveSnapshot; int dividerBar = (splitBoundsConfig.appsStackedVertically ? splitBoundsConfig.visualDividerBounds.height() : splitBoundsConfig.visualDividerBounds.width()); int dividerBar = splitBoundsConfig.appsStackedVertically ? (int) (splitBoundsConfig.dividerHeightPercent * parentHeight) : (int) (splitBoundsConfig.dividerWidthPercent * parentWidth); int primarySnapshotHeight; int primarySnapshotWidth; int secondarySnapshotHeight; Loading
src/com/android/launcher3/util/SplitConfigurationOptions.java +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public final class SplitConfigurationOptions { // This class is orientation-agnostic, so we compute both for later use public final float topTaskPercent; public final float leftTaskPercent; public final float dividerWidthPercent; public final float dividerHeightPercent; /** * If {@code true}, that means at the time of creation of this object, the * split-screened apps were vertically stacked. This is useful in scenarios like Loading Loading @@ -130,6 +132,8 @@ public final class SplitConfigurationOptions { leftTaskPercent = this.leftTopBounds.width() / (float) rightBottomBounds.right; topTaskPercent = this.leftTopBounds.height() / (float) rightBottomBounds.bottom; dividerWidthPercent = visualDividerBounds.width() / (float) rightBottomBounds.right; dividerHeightPercent = visualDividerBounds.height() / (float) rightBottomBounds.bottom; } } Loading