From 38bc885de9407f7e50e76fbe6470f8425cb5f61b Mon Sep 17 00:00:00 2001 From: Uwais Ashraf Date: Wed, 3 Apr 2024 12:49:52 +0000 Subject: [PATCH] Revert "Update Split button visibility based on DeviceProfile change" This reverts commit 170306d54a79a0390727636563dd22ca742dc09e. Reason for revert: Cause of b/332673787 Bug: 321291049 Change-Id: Id5ae99d28a7497debaabbc5ed09cd18f9c253750 --- .../com/android/quickstep/views/OverviewActionsView.java | 9 ++++----- .../src/com/android/quickstep/views/RecentsView.java | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java index 882ccec9e7..384a8d8656 100644 --- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java +++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java @@ -243,13 +243,13 @@ public class OverviewActionsView extends FrameLayo /** * Updates a batch of flags to hide and show actions buttons for tablet/non tablet case. + * @param isSmallScreen True if the current display is a small screen. */ - private void updateForIsTablet() { - assert mDp != null; + public void updateForSmallScreen(boolean isSmallScreen) { // Update flags to see if split button should be hidden. - updateSplitButtonHiddenFlags(FLAG_SMALL_SCREEN_HIDE_SPLIT, !mDp.isTablet); + updateSplitButtonHiddenFlags(FLAG_SMALL_SCREEN_HIDE_SPLIT, isSmallScreen); // Update flags to see if save app pair button should be hidden. - updateAppPairButtonHiddenFlags(FLAG_SMALL_SCREEN_HIDE_APP_PAIR, !mDp.isTablet); + updateAppPairButtonHiddenFlags(FLAG_SMALL_SCREEN_HIDE_APP_PAIR, isSmallScreen); } /** @@ -386,7 +386,6 @@ public class OverviewActionsView extends FrameLayo mDp = dp; mTaskSize.set(taskSize); updateVerticalMargin(DisplayController.getNavigationMode(getContext())); - updateForIsTablet(); requestLayout(); diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index e57af3a85a..2aa16a948a 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -3962,6 +3962,8 @@ public abstract class RecentsView