From 2f2429e56591b259dc76afc23fc734e6ffbb4425 Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Thu, 20 Jun 2024 09:46:30 +0000 Subject: [PATCH] Fix digital wellbeing banner position in portrait mode The banner should be aligned to the start of the screen, not the center. This CL fixes DWB position for split tasks when device is unfolded. Fix: 348200661 Bug: 345789862 Flag: EXEMPT bugfix Test: Manual. Add a Digital Wellbeing (DWB) timer to 2 apps. Open these two apps in split mode. Unfold the device and go to Overview. The DWB banner should aligned correctly. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3d088e3899cfca516dfa8ae9699691ece2b914d9) Merged-In: I0544b4a8eb85b00196373c8a4368e680abab222b Change-Id: I0544b4a8eb85b00196373c8a4368e680abab222b --- .../quickstep/orientation/PortraitPagedViewHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java index 758a737bec..eeacee1cf6 100644 --- a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java +++ b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.java @@ -259,7 +259,8 @@ public class PortraitPagedViewHandler extends DefaultPagedViewHandler implements return new Pair<>(translationX, translationY); } - bannerParams.gravity = BOTTOM | ((deviceProfile.isLandscape) ? START : CENTER_HORIZONTAL); + bannerParams.gravity = + BOTTOM | (deviceProfile.isLeftRightSplit ? START : CENTER_HORIZONTAL); // Set correct width if (desiredTaskId == splitBounds.leftTopTaskId) {