Do not apply rounded corner background to task bar when it's in phone mode

Fixes: 311428370
Test: Make sure nav bar in landscape phone mode doesn't have weird clips
Change-Id: I0c402dd10a3bd39afd5692d21ef8adaad04646db
This commit is contained in:
Tracy Zhou committed 2023-12-04 22:07:04 -08:00
1 parent b6ebbb019c
commit ec26a138d5
1 file changed
+8 -3
@@ -203,11 +203,16 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
Display display = windowContext.getDisplay();
Context c = getApplicationContext();
mWindowManager = c.getSystemService(WindowManager.class);
mLeftCorner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
mRightCorner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
boolean phoneMode = TaskbarManager.isPhoneMode(mDeviceProfile);
mLeftCorner = phoneMode
? null
: display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
mRightCorner = phoneMode
? null
: display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
// Inflate views.
boolean phoneMode = TaskbarManager.isPhoneMode(mDeviceProfile);
int taskbarLayout = DisplayController.isTransientTaskbar(this) && !phoneMode
? R.layout.transient_taskbar
: R.layout.taskbar;