commit | bd04196f8dd308c3537f4104570c871ad8595c03 | [log] [tgz] |
---|---|---|
author | Winson Chung <winsonc@google.com> | Mon Mar 06 15:07:25 2017 -0800 |
committer | Winson Chung <winsonc@google.com> | Mon Mar 27 12:17:39 2017 -0700 |
tree | 69a52d470299bd7b1ac79212b195868f84bae6f5 | |
parent | af4bb6864fc377e3fe243f9d57f7dbbe22ef84e7 [diff] [blame] |
Updating to new aspect ratio limits. Bug: 35949789 Test: android.server.cts.ActivityManagerPinnedStackTests Change-Id: Id47bdee0903744efb6aa3200691cd7817463aa13
diff --git a/services/core/java/com/android/server/wm/PinnedStackController.java b/services/core/java/com/android/server/wm/PinnedStackController.java index 012480e..3ce61f0 100644 --- a/services/core/java/com/android/server/wm/PinnedStackController.java +++ b/services/core/java/com/android/server/wm/PinnedStackController.java
@@ -195,7 +195,8 @@ * @return whether the given {@param aspectRatio} is valid. */ public boolean isValidPictureInPictureAspectRatio(float aspectRatio) { - return mMinAspectRatio <= aspectRatio && aspectRatio <= mMaxAspectRatio; + return Float.compare(mMinAspectRatio, aspectRatio) <= 0 && + Float.compare(aspectRatio, mMaxAspectRatio) <= 0; } /**