Merge "Update for stashed taskbar animation" into tm-qpr-dev am: 18d5634176
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20470413 Change-Id: I641cdf68d3e3b58e9ce77a12d16082d55297d4b4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -320,6 +320,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
|||||||
|
|
||||||
// mIsRecentsRtl is the inverse of TaskView RTL.
|
// mIsRecentsRtl is the inverse of TaskView RTL.
|
||||||
boolean isRtlEnabled = !mIsRecentsRtl;
|
boolean isRtlEnabled = !mIsRecentsRtl;
|
||||||
|
mPositionHelper.setTaskbarInApp(mDp.isTaskbarPresentInApps);
|
||||||
mPositionHelper.updateThumbnailMatrix(
|
mPositionHelper.updateThumbnailMatrix(
|
||||||
mThumbnailPosition, mThumbnailData, mTaskRect.width(), mTaskRect.height(),
|
mThumbnailPosition, mThumbnailData, mTaskRect.width(), mTaskRect.height(),
|
||||||
mDp.widthPx, mDp.heightPx, mDp.taskbarSize, mDp.isTablet,
|
mDp.widthPx, mDp.heightPx, mDp.taskbarSize, mDp.isTablet,
|
||||||
|
|||||||
@@ -464,6 +464,8 @@ public class TaskThumbnailView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateThumbnailMatrix() {
|
private void updateThumbnailMatrix() {
|
||||||
|
DeviceProfile dp = mActivity.getDeviceProfile();
|
||||||
|
mPreviewPositionHelper.setTaskbarInApp(dp.isTaskbarPresentInApps);
|
||||||
mPreviewPositionHelper.setOrientationChanged(false);
|
mPreviewPositionHelper.setOrientationChanged(false);
|
||||||
if (mBitmapShader != null && mThumbnailData != null) {
|
if (mBitmapShader != null && mThumbnailData != null) {
|
||||||
mPreviewRect.set(0, 0, mThumbnailData.thumbnail.getWidth(),
|
mPreviewRect.set(0, 0, mThumbnailData.thumbnail.getWidth(),
|
||||||
@@ -471,7 +473,6 @@ public class TaskThumbnailView extends View {
|
|||||||
int currentRotation = getTaskView().getRecentsView().getPagedViewOrientedState()
|
int currentRotation = getTaskView().getRecentsView().getPagedViewOrientedState()
|
||||||
.getRecentsActivityRotation();
|
.getRecentsActivityRotation();
|
||||||
boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||||
DeviceProfile dp = mActivity.getDeviceProfile();
|
|
||||||
mPreviewPositionHelper.updateThumbnailMatrix(mPreviewRect, mThumbnailData,
|
mPreviewPositionHelper.updateThumbnailMatrix(mPreviewRect, mThumbnailData,
|
||||||
getMeasuredWidth(), getMeasuredHeight(), dp.widthPx, dp.heightPx,
|
getMeasuredWidth(), getMeasuredHeight(), dp.widthPx, dp.heightPx,
|
||||||
dp.taskbarSize, dp.isTablet, currentRotation, isRtl);
|
dp.taskbarSize, dp.isTablet, currentRotation, isRtl);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
|
|||||||
import androidx.test.filters.SmallTest
|
import androidx.test.filters.SmallTest
|
||||||
import com.android.launcher3.DeviceProfileBaseTest
|
import com.android.launcher3.DeviceProfileBaseTest
|
||||||
import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT
|
import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT
|
||||||
|
import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT
|
||||||
import com.android.quickstep.views.TaskView.FullscreenDrawParams
|
import com.android.quickstep.views.TaskView.FullscreenDrawParams
|
||||||
import com.android.systemui.shared.recents.model.ThumbnailData
|
import com.android.systemui.shared.recents.model.ThumbnailData
|
||||||
import com.android.systemui.shared.recents.utilities.PreviewPositionHelper
|
import com.android.systemui.shared.recents.utilities.PreviewPositionHelper
|
||||||
@@ -103,6 +104,33 @@ class FullscreenDrawParamsTest : DeviceProfileBaseTest() {
|
|||||||
.isWithin(1f).of(expectedBottomHint)
|
.isWithin(1f).of(expectedBottomHint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun setFullProgress_currentDrawnInsets_clipTaskbarSizeFromTopForTablets_splitPortrait() {
|
||||||
|
initializeVarsForTablet()
|
||||||
|
val dp = newDP()
|
||||||
|
val previewRect = Rect(0, 0, 100, 100)
|
||||||
|
val canvasWidth = (dp.widthPx * TASK_SCALE).roundToInt()
|
||||||
|
val canvasHeight = (dp.heightPx * TASK_SCALE / 2).roundToInt()
|
||||||
|
val currentRotation = 0
|
||||||
|
val isRtl = false
|
||||||
|
// portrait/vertical split apps
|
||||||
|
val dividerSize = 10
|
||||||
|
val splitBounds = SplitBounds(
|
||||||
|
Rect(0, 0, dp.widthPx, (dp.heightPx - dividerSize) / 2),
|
||||||
|
Rect(0, (dp.heightPx + dividerSize) / 2, dp.widthPx, dp.heightPx),
|
||||||
|
0 /*lefTopTaskId*/, 0 /*rightBottomTaskId*/)
|
||||||
|
mPreviewPositionHelper.setSplitBounds(splitBounds, STAGE_POSITION_TOP_OR_LEFT)
|
||||||
|
|
||||||
|
mPreviewPositionHelper.updateThumbnailMatrix(previewRect, mThumbnailData, canvasWidth,
|
||||||
|
canvasHeight, dp.widthPx, dp.heightPx, dp.taskbarSize, dp.isTablet, currentRotation,
|
||||||
|
isRtl)
|
||||||
|
params.setProgress(/* fullscreenProgress= */ 1.0f, /* parentScale= */ 1.0f,
|
||||||
|
/* taskViewScale= */ 1.0f, /* previewWidth= */ 0, dp, mPreviewPositionHelper)
|
||||||
|
|
||||||
|
assertThat(params.mCurrentDrawnInsets.bottom)
|
||||||
|
.isWithin(1f).of((0f))
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun setFullProgress_currentDrawnInsets_clipTaskbarSizeFromBottomForTablets_splitLandscape() {
|
fun setFullProgress_currentDrawnInsets_clipTaskbarSizeFromBottomForTablets_splitLandscape() {
|
||||||
initializeVarsForTablet(isLandscape = true)
|
initializeVarsForTablet(isLandscape = true)
|
||||||
|
|||||||
Reference in New Issue
Block a user