Revert^2 "Maximised the taskbar window to the default size"

This reverts commit 28f664a3cb.

Reason for revert: Check if the presubmit passes

Change-Id: Ic1336d8620916b98eaca3656ed844e1d5f181254
This commit is contained in:
mpodolian
2025-04-09 17:35:50 -07:00
parent b0d0d41a2a
commit de74f01f01
@@ -1296,20 +1296,25 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
}
/**
* Updates the TaskbarContainer size (pass {@link #getDefaultTaskbarWindowSize()} to reset).
* Updates the TaskbarContainer size, using the maximum of the provided {@code size}
* and the default size from {@link #getDefaultTaskbarWindowSize()}.
*/
public void setTaskbarWindowSize(int size) {
// In landscape phone button nav mode, we should set the task bar width instead of height
// because this is the only case in which the nav bar is not on the display bottom.
int windowSize = size;
if (windowSize != MATCH_PARENT) {
windowSize = Math.max(size, getDefaultTaskbarWindowSize());
}
boolean landscapePhoneButtonNav = isPhoneButtonNavMode() && mDeviceProfile.isLandscape;
if ((landscapePhoneButtonNav ? mWindowLayoutParams.width : mWindowLayoutParams.height)
== size || mIsDestroyed) {
== windowSize || mIsDestroyed) {
return;
}
if (size == MATCH_PARENT) {
size = mDeviceProfile.heightPx;
if (windowSize == MATCH_PARENT) {
windowSize = mDeviceProfile.heightPx;
} else {
mLastRequestedNonFullscreenSize = size;
mLastRequestedNonFullscreenSize = windowSize;
if (mIsFullscreen || mIsTaskbarSizeFrozenForAnimatingBubble) {
// We either still need to be fullscreen or a bubble is still animating, so defer
// any change to our height until setTaskbarWindowFullscreen(false) is called or
@@ -1321,14 +1326,14 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
}
}
if (landscapePhoneButtonNav) {
mWindowLayoutParams.width = size;
mWindowLayoutParams.width = windowSize;
for (int rot = Surface.ROTATION_0; rot <= Surface.ROTATION_270; rot++) {
mWindowLayoutParams.paramsForRotation[rot].width = size;
mWindowLayoutParams.paramsForRotation[rot].width = windowSize;
}
} else {
mWindowLayoutParams.height = size;
mWindowLayoutParams.height = windowSize;
for (int rot = Surface.ROTATION_0; rot <= Surface.ROTATION_270; rot++) {
mWindowLayoutParams.paramsForRotation[rot].height = size;
mWindowLayoutParams.paramsForRotation[rot].height = windowSize;
}
}
mControllers.runAfterInit(