Support insets on secondary displays
Indroduced DisplayFrames object to track frames used to calculate window insets per display vs. at a global level in PhoneWindowManager. Bug: 64148922 Change-Id: I19f166920eba0a4f933a223a77e096bcc8dab0c1 Test: bit FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests Test: go/wm-smoke
This commit is contained in:
@@ -474,6 +474,19 @@ public final class Rect implements Parcelable {
|
||||
return intersect(r.left, r.top, r.right, r.bottom);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the specified rectangle intersects this rectangle, set this rectangle to that
|
||||
* intersection, otherwise set this rectangle to the empty rectangle.
|
||||
* @see #inset(int, int, int, int) but without checking if the rects overlap.
|
||||
* @hide
|
||||
*/
|
||||
public void intersectUnchecked(Rect other) {
|
||||
left = Math.max(left, other.left);
|
||||
top = Math.max(top, other.top);
|
||||
right = Math.min(right, other.right);
|
||||
bottom = Math.min(bottom, other.bottom);
|
||||
}
|
||||
|
||||
/**
|
||||
* If rectangles a and b intersect, return true and set this rectangle to
|
||||
* that intersection, otherwise return false and do not change this
|
||||
|
||||
Reference in New Issue
Block a user