From 488d992874b501aa118c644f2433a38614b45ce9 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Thu, 9 Dec 2021 07:04:11 +0000 Subject: [PATCH] Do not show buttons in screen pinning dialog on tablets Change-Id: Ic8ab687ae9eef5c24e30d3e61b43547588468156 Fixes: 199544447 Test: manual --- .../com/android/systemui/recents/ScreenPinningRequest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java index 85bf98c09f594..7f130cb203c0e 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +++ b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java @@ -16,6 +16,7 @@ package com.android.systemui.recents; +import static com.android.systemui.shared.recents.utilities.Utilities.isTablet; import static com.android.systemui.util.leak.RotationUtils.ROTATION_LANDSCAPE; import static com.android.systemui.util.leak.RotationUtils.ROTATION_NONE; import static com.android.systemui.util.leak.RotationUtils.ROTATION_SEASCAPE; @@ -248,8 +249,8 @@ public class ScreenPinningRequest implements View.OnClickListener, .setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); WindowManagerWrapper wm = WindowManagerWrapper.getInstance(); - if (!QuickStepContract.isGesturalMode(mNavBarMode) - && wm.hasSoftNavigationBar(mContext.getDisplayId())) { + if (!QuickStepContract.isGesturalMode(mNavBarMode) + && wm.hasSoftNavigationBar(mContext.getDisplayId()) && !isTablet(mContext)) { buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); swapChildrenIfRtlAndVertical(buttons); } else {