mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Merge "Make getTaskSize actaully a getter that does not modify member variables" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
b6cbb2a419
@@ -2093,22 +2093,20 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
// Update task size and padding that are dependent on DeviceProfile and insets.
|
||||
private void updateSizeAndPadding() {
|
||||
DeviceProfile dp = mActivity.getDeviceProfile();
|
||||
getTaskSize(mTempRect);
|
||||
mTaskWidth = mTempRect.width();
|
||||
mTaskHeight = mTempRect.height();
|
||||
getTaskSize(mLastComputedTaskSize);
|
||||
mTaskWidth = mLastComputedTaskSize.width();
|
||||
mTaskHeight = mLastComputedTaskSize.height();
|
||||
|
||||
mTempRect.top -= dp.overviewTaskThumbnailTopMarginPx;
|
||||
setPadding(mTempRect.left - mInsets.left, mTempRect.top - mInsets.top,
|
||||
dp.widthPx - mInsets.right - mTempRect.right,
|
||||
dp.heightPx - mInsets.bottom - mTempRect.bottom);
|
||||
setPadding(mLastComputedTaskSize.left - mInsets.left,
|
||||
mLastComputedTaskSize.top - dp.overviewTaskThumbnailTopMarginPx - mInsets.top,
|
||||
dp.widthPx - mInsets.right - mLastComputedTaskSize.right,
|
||||
dp.heightPx - mInsets.bottom - mLastComputedTaskSize.bottom);
|
||||
|
||||
mSizeStrategy.calculateGridSize(mActivity.getDeviceProfile(), mActivity,
|
||||
mLastComputedGridSize);
|
||||
mSizeStrategy.calculateGridTaskSize(mActivity, mActivity.getDeviceProfile(),
|
||||
mLastComputedGridTaskSize, getPagedOrientationHandler());
|
||||
mSizeStrategy.calculateGridSize(dp, mActivity, mLastComputedGridSize);
|
||||
mSizeStrategy.calculateGridTaskSize(mActivity, dp, mLastComputedGridTaskSize,
|
||||
getPagedOrientationHandler());
|
||||
if (isDesktopModeSupported()) {
|
||||
mSizeStrategy.calculateDesktopTaskSize(mActivity, mActivity.getDeviceProfile(),
|
||||
mLastComputedDesktopTaskSize);
|
||||
mSizeStrategy.calculateDesktopTaskSize(mActivity, dp, mLastComputedDesktopTaskSize);
|
||||
}
|
||||
if (enableGridOnlyOverview()) {
|
||||
mSizeStrategy.calculateCarouselTaskSize(mActivity, dp, mLastComputedCarouselTaskSize,
|
||||
@@ -2169,7 +2167,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
public void getTaskSize(Rect outRect) {
|
||||
mSizeStrategy.calculateTaskSize(mActivity, mActivity.getDeviceProfile(), outRect,
|
||||
getPagedOrientationHandler());
|
||||
mLastComputedTaskSize.set(outRect);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4407,9 +4404,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
|
||||
updateEmptyStateUi(changed);
|
||||
|
||||
// Update the pivots such that when the task is scaled, it fills the full page
|
||||
getTaskSize(mTempRect);
|
||||
updatePivots();
|
||||
setTaskModalness(mTaskModalness);
|
||||
mLastComputedTaskStartPushOutDistance = null;
|
||||
mLastComputedTaskEndPushOutDistance = null;
|
||||
|
||||
Reference in New Issue
Block a user