From ac736e7dac6355aead42e6b0315904182935db04 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 3 Mar 2022 20:00:42 +0000 Subject: [PATCH] Provide content insets while in SUW in portrait mode - We keep the app setup flag set, but adjust the insets to inset SUW itself in portrait Bug: 219879035 Test: With both 3button and gesture nav, verify that portrait mode SUW is always inset Change-Id: Iad0b6c41feaa3fb169af75c071b7f9544b42bab7 --- .../android/launcher3/taskbar/TaskbarStashController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java index d083602a78..08e3416a4f 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java @@ -29,6 +29,7 @@ import android.annotation.Nullable; import android.content.SharedPreferences; import android.view.ViewConfiguration; +import com.android.launcher3.DeviceProfile; import com.android.launcher3.Utilities; import com.android.launcher3.util.MultiValueAlpha.AlphaProperty; import com.android.quickstep.AnimatedFloat; @@ -255,6 +256,13 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba */ public int getContentHeightToReportToApps() { if (supportsVisualStashing() && hasAnyFlag(FLAGS_REPORT_STASHED_INSETS_TO_APP)) { + DeviceProfile dp = mActivity.getDeviceProfile(); + if (hasAnyFlag(FLAG_STASHED_IN_APP_SETUP) && dp.isTaskbarPresent && !dp.isLandscape) { + // We always show the back button in SUW but in portrait the SUW layout may not + // be wide enough to support overlapping the nav bar with its content. For now, + // just inset by the bar height. + return mUnstashedHeight; + } boolean isAnimating = mAnimator != null && mAnimator.isStarted(); return mControllers.stashedHandleViewController.isStashedHandleVisible() || isAnimating ? mStashedHeight : 0;