Merge "Use BaseContainerInterface.getTaskDimension for windowSize in DesktopTaskView" into main
diff --git a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java
index 964f531..87820f2 100644
--- a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java
+++ b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java
@@ -23,6 +23,7 @@
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Point;
+import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
@@ -45,6 +46,7 @@
import com.android.launcher3.icons.IconProvider;
import com.android.launcher3.util.CancellableTask;
import com.android.launcher3.util.RunnableList;
+import com.android.quickstep.BaseContainerInterface;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.TaskThumbnailCache;
import com.android.quickstep.util.RecentsOrientedState;
@@ -87,6 +89,8 @@
private int mChildCountAtInflation;
+ private final PointF mTempPointF = new PointF();
+
public DesktopTaskView(Context context) {
this(context, null);
}
@@ -431,8 +435,10 @@
return;
}
- int windowWidth = mContainer.getDeviceProfile().widthPx;
- int windowHeight = mContainer.getDeviceProfile().heightPx;
+ BaseContainerInterface.getTaskDimension(mContext, mContainer.getDeviceProfile(),
+ mTempPointF);
+ int windowWidth = (int) mTempPointF.x;
+ int windowHeight = (int) mTempPointF.y;
float scaleWidth = containerWidth / (float) windowWidth;
float scaleHeight = containerHeight / (float) windowHeight;