Merge "Ensure we account for insets in minimized state."
This commit is contained in:
committed by
Android (Google) Code Review
commit
bae6c26fdf
@@ -128,11 +128,14 @@ public class PipSnapAlgorithm {
|
||||
/**
|
||||
* Applies the offset to the {@param stackBounds} to adjust it to a minimized state.
|
||||
*/
|
||||
public void applyMinimizedOffset(Rect stackBounds, Rect movementBounds, Point displaySize) {
|
||||
public void applyMinimizedOffset(Rect stackBounds, Rect movementBounds, Point displaySize,
|
||||
Rect stableInsets) {
|
||||
if (stackBounds.left <= movementBounds.centerX()) {
|
||||
stackBounds.offsetTo(-stackBounds.width() + mMinimizedVisibleSize, stackBounds.top);
|
||||
stackBounds.offsetTo(stableInsets.left + mMinimizedVisibleSize - stackBounds.width(),
|
||||
stackBounds.top);
|
||||
} else {
|
||||
stackBounds.offsetTo(displaySize.x - mMinimizedVisibleSize, stackBounds.top);
|
||||
stackBounds.offsetTo(displaySize.x - stableInsets.right - mMinimizedVisibleSize,
|
||||
stackBounds.top);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user