Merge "Fix unwanted PIP window dismissal when moving to the bottom" into pi-dev
am: 5a0c1e1101
Change-Id: I5544c8b5e7b79a9b8002be53a04cf0af48c7f050
This commit is contained in:
@@ -225,9 +225,10 @@ public class PipMotionHelper implements Handler.Callback {
|
||||
*/
|
||||
boolean shouldDismissPip() {
|
||||
Point displaySize = new Point();
|
||||
mContext.getDisplay().getSize(displaySize);
|
||||
if (mBounds.bottom > displaySize.y) {
|
||||
float offscreenFraction = (float) (mBounds.bottom - displaySize.y) / mBounds.height();
|
||||
mContext.getDisplay().getRealSize(displaySize);
|
||||
final int y = displaySize.y - mStableInsets.bottom;
|
||||
if (mBounds.bottom > y) {
|
||||
float offscreenFraction = (float) (mBounds.bottom - y) / mBounds.height();
|
||||
return offscreenFraction >= DISMISS_OFFSCREEN_FRACTION;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user