diff --git a/quickstep/src/com/android/quickstep/BaseContainerInterface.java b/quickstep/src/com/android/quickstep/BaseContainerInterface.java index b1d511cfcd..3a8c141ecf 100644 --- a/quickstep/src/com/android/quickstep/BaseContainerInterface.java +++ b/quickstep/src/com/android/quickstep/BaseContainerInterface.java @@ -42,6 +42,7 @@ import com.android.launcher3.statehandlers.DesktopVisibilityController; import com.android.launcher3.statemanager.BaseState; import com.android.launcher3.taskbar.TaskbarUIController; import com.android.launcher3.util.DisplayController; +import com.android.launcher3.util.WindowBounds; import com.android.launcher3.views.ScrimView; import com.android.quickstep.orientation.RecentsPagedOrientationHandler; import com.android.quickstep.util.ActivityInitListener; @@ -51,6 +52,7 @@ import com.android.quickstep.views.RecentsViewContainer; import com.android.systemui.shared.recents.model.ThumbnailData; import java.util.HashMap; +import java.util.List; import java.util.function.Consumer; import java.util.function.Predicate; @@ -269,8 +271,11 @@ public abstract class BaseContainerInterface windowBounds = + displayController.getInfo().getCurrentBounds(); + Rect deviceRotationInsets = windowBounds != null + ? windowBounds.get(orientationHandler.getRotation()).insets + : new Rect(); // Obtain the landscape/seascape insets, and rotate it to portrait perspective. orientationHandler.rotateInsets(deviceRotationInsets, outRect); // Then combine with portrait's insets to leave space for status bar/nav bar in diff --git a/src/com/android/launcher3/util/DisplayController.java b/src/com/android/launcher3/util/DisplayController.java index 3dcc663c91..f65f46a850 100644 --- a/src/com/android/launcher3/util/DisplayController.java +++ b/src/com/android/launcher3/util/DisplayController.java @@ -49,6 +49,7 @@ import android.util.Log; import android.view.Display; import androidx.annotation.AnyThread; +import androidx.annotation.Nullable; import androidx.annotation.UiThread; import androidx.annotation.VisibleForTesting; @@ -513,9 +514,8 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { return Collections.unmodifiableSet(mPerDisplayBounds.keySet()); } - /** - * Returns all {@link WindowBounds}s for the current display. - */ + /** Returns all {@link WindowBounds}s for the current display. */ + @Nullable public List getCurrentBounds() { return mPerDisplayBounds.get(normalizedDisplayInfo); }