Prevent updating aspect ratio unless it is different.
- The old check of the bounds assumed there was no expanded state, so when
a PiP activity tries to set the aspect ratio from a a menu action, it
will cause an animation to the normal bounds again.
Bug: 36462497
Test: Set aspect ratio in pip action handler
Change-Id: Iba5e9571a3024c8369c2a24d32c2d8f34831ede4
diff --git a/services/core/java/com/android/server/wm/PinnedStackController.java b/services/core/java/com/android/server/wm/PinnedStackController.java
index 0e6b1b6..012480e 100644
--- a/services/core/java/com/android/server/wm/PinnedStackController.java
+++ b/services/core/java/com/android/server/wm/PinnedStackController.java
@@ -299,6 +299,13 @@
}
/**
+ * @return the current aspect ratio.
+ */
+ float getAspectRatio() {
+ return mAspectRatio;
+ }
+
+ /**
* Sets the current set of actions.
*/
void setActions(List<RemoteAction> actions) {