Loading services/core/java/com/android/server/wm/PinnedStackController.java +7 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,13 @@ class PinnedStackController { } } /** * @return the current aspect ratio. */ float getAspectRatio() { return mAspectRatio; } /** * Sets the current set of actions. */ Loading services/core/java/com/android/server/wm/PinnedStackWindowController.java +9 −11 Original line number Diff line number Diff line Loading @@ -82,21 +82,19 @@ public class PinnedStackWindowController extends StackWindowController { return; } final PinnedStackController pinnedStackController = mContainer.getDisplayContent().getPinnedStackController(); if (Float.compare(aspectRatio, pinnedStackController.getAspectRatio()) != 0) { final int displayId = mContainer.getDisplayContent().getDisplayId(); final Rect toBounds = mService.getPictureInPictureBounds(displayId, aspectRatio); final Rect targetBounds = new Rect(); mContainer.getAnimatingBounds(targetBounds); if (!toBounds.equals(targetBounds)) { animateResizePinnedStack(toBounds, -1 /* duration */); } final PinnedStackController pinnedStackController = mContainer.getDisplayContent().getPinnedStackController(); pinnedStackController.setAspectRatio( pinnedStackController.isValidPictureInPictureAspectRatio(aspectRatio) ? aspectRatio : -1f); } } } /** * Sets the current picture-in-picture actions. Loading Loading
services/core/java/com/android/server/wm/PinnedStackController.java +7 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,13 @@ class PinnedStackController { } } /** * @return the current aspect ratio. */ float getAspectRatio() { return mAspectRatio; } /** * Sets the current set of actions. */ Loading
services/core/java/com/android/server/wm/PinnedStackWindowController.java +9 −11 Original line number Diff line number Diff line Loading @@ -82,21 +82,19 @@ public class PinnedStackWindowController extends StackWindowController { return; } final PinnedStackController pinnedStackController = mContainer.getDisplayContent().getPinnedStackController(); if (Float.compare(aspectRatio, pinnedStackController.getAspectRatio()) != 0) { final int displayId = mContainer.getDisplayContent().getDisplayId(); final Rect toBounds = mService.getPictureInPictureBounds(displayId, aspectRatio); final Rect targetBounds = new Rect(); mContainer.getAnimatingBounds(targetBounds); if (!toBounds.equals(targetBounds)) { animateResizePinnedStack(toBounds, -1 /* duration */); } final PinnedStackController pinnedStackController = mContainer.getDisplayContent().getPinnedStackController(); pinnedStackController.setAspectRatio( pinnedStackController.isValidPictureInPictureAspectRatio(aspectRatio) ? aspectRatio : -1f); } } } /** * Sets the current picture-in-picture actions. Loading