Revert "Move BaseActivityInterface task size methods to DevicePr..."
Revert "Move BaseActivityInterface task size methods to DevicePr..." Revert submission 19279487-baseactivityinterface Reason for revert: As per discussion in ag/19341332, make sure DeviceProfile can properly react to inset changes before moving task size calculations there Reverted Changes: I30324d34c:Move BaseActivityInterface task size methods to De... Ia9c1d0387:Move BaseActivityInterface task size methods to De... Bug: 238593212 Change-Id: I0d40fdd4a5d4468494e30cef32a284479ddd2feb
This commit is contained in:
1 parent
4e73e5e352
commit
62572c04e2
37 files changed
+307
-1598
No files matched your search
@@ -1431,8 +1431,9 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
DeviceProfile deviceProfile = mActivity.getDeviceProfile();
|
||||
if (deviceProfile.isTablet) {
|
||||
final int thumbnailPadding = deviceProfile.overviewTaskThumbnailTopMarginPx;
|
||||
final int taskWidth = deviceProfile.overviewTaskRect.width();
|
||||
final int taskHeight = deviceProfile.overviewTaskRect.height();
|
||||
final Rect lastComputedTaskSize = getRecentsView().getLastComputedTaskSize();
|
||||
final int taskWidth = lastComputedTaskSize.width();
|
||||
final int taskHeight = lastComputedTaskSize.height();
|
||||
|
||||
int boxWidth;
|
||||
int boxHeight;
|
||||
@@ -1443,9 +1444,10 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
boxWidth = taskWidth;
|
||||
boxHeight = taskHeight;
|
||||
} else {
|
||||
// Otherwise task is in grid.
|
||||
boxWidth = deviceProfile.overviewGridTaskDimension.x;
|
||||
boxHeight = deviceProfile.overviewGridTaskDimension.y;
|
||||
// Otherwise task is in grid, and should use lastComputedGridTaskSize.
|
||||
Rect lastComputedGridTaskSize = getRecentsView().getLastComputedGridTaskSize();
|
||||
boxWidth = lastComputedGridTaskSize.width();
|
||||
boxHeight = lastComputedGridTaskSize.height();
|
||||
}
|
||||
|
||||
// Bound width/height to the box size.
|
||||
|
||||
Reference in new issue
Block a user