summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2017-05-22 11:14:22 -0700
committerWinson Chung <winsonc@google.com>2017-05-30 16:36:48 +0000
commita71febe2aaa2796cde538aa21c3e2ff006e7d3f3 (patch)
treea5754799da9f822509b52ecaf3e03b099444c419 /core/java/android
parentaa051df3b6c72a8d696611bd73b882cc37fc5eca (diff)
Fix issue with aspect ratio not applying correctly when PIP is expanded
- The current code always used the default min edge size to calculate the PIP bounds when the aspect ratio changes, so if a PIP app sets the aspect ratio in response to the an action, the bounds would be resized down incorrectly. - This CL fixes the issue with current aspect ratio not being initialized correctly, and also ensures that SystemUI always updates the min edge size when expanding the PIP. Bug: 38324839 Test: android.server.cts.ActivityManagerPinnedStackTests Test: go/wm-smoke Change-Id: Ida0f68b2f8f93f9bf1915dda8762a156704d4709
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/IPinnedStackController.aidl8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/view/IPinnedStackController.aidl b/core/java/android/view/IPinnedStackController.aidl
index dbeb747adfba..d2dcb568ef6c 100644
--- a/core/java/android/view/IPinnedStackController.aidl
+++ b/core/java/android/view/IPinnedStackController.aidl
@@ -30,6 +30,14 @@ interface IPinnedStackController {
oneway void setIsMinimized(boolean isMinimized);
/**
+ * Notifies the controller of the current min edge size, this is needed to allow the system to
+ * properly calculate the aspect ratio of the expanded PIP. The given {@param minEdgeSize} is
+ * always bounded to be larger than the default minEdgeSize, so the caller can call this method
+ * with 0 to reset to the default size.
+ */
+ oneway void setMinEdgeSize(int minEdgeSize);
+
+ /**
* @return what WM considers to be the current device rotation.
*/
int getDisplayRotation();