Loading quickstep/src/com/android/quickstep/BaseContainerInterface.java +7 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -269,8 +271,11 @@ public abstract class BaseContainerInterface<STATE_TYPE extends BaseState<STATE_ } else { Rect portraitInsets = dp.getInsets(); DisplayController displayController = DisplayController.INSTANCE.get(context); Rect deviceRotationInsets = displayController.getInfo().getCurrentBounds().get( orientationHandler.getRotation()).insets; @Nullable List<WindowBounds> 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 Loading src/com/android/launcher3/util/DisplayController.java +3 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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<WindowBounds> getCurrentBounds() { return mPerDisplayBounds.get(normalizedDisplayInfo); } Loading Loading
quickstep/src/com/android/quickstep/BaseContainerInterface.java +7 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -269,8 +271,11 @@ public abstract class BaseContainerInterface<STATE_TYPE extends BaseState<STATE_ } else { Rect portraitInsets = dp.getInsets(); DisplayController displayController = DisplayController.INSTANCE.get(context); Rect deviceRotationInsets = displayController.getInfo().getCurrentBounds().get( orientationHandler.getRotation()).insets; @Nullable List<WindowBounds> 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 Loading
src/com/android/launcher3/util/DisplayController.java +3 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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<WindowBounds> getCurrentBounds() { return mPerDisplayBounds.get(normalizedDisplayInfo); } Loading