Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -225,9 +225,10 @@ public class PipMotionHelper implements Handler.Callback { */ */ boolean shouldDismissPip() { boolean shouldDismissPip() { Point displaySize = new Point(); Point displaySize = new Point(); mContext.getDisplay().getSize(displaySize); mContext.getDisplay().getRealSize(displaySize); if (mBounds.bottom > displaySize.y) { final int y = displaySize.y - mStableInsets.bottom; float offscreenFraction = (float) (mBounds.bottom - displaySize.y) / mBounds.height(); if (mBounds.bottom > y) { float offscreenFraction = (float) (mBounds.bottom - y) / mBounds.height(); return offscreenFraction >= DISMISS_OFFSCREEN_FRACTION; return offscreenFraction >= DISMISS_OFFSCREEN_FRACTION; } } return false; return false; Loading Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -225,9 +225,10 @@ public class PipMotionHelper implements Handler.Callback { */ */ boolean shouldDismissPip() { boolean shouldDismissPip() { Point displaySize = new Point(); Point displaySize = new Point(); mContext.getDisplay().getSize(displaySize); mContext.getDisplay().getRealSize(displaySize); if (mBounds.bottom > displaySize.y) { final int y = displaySize.y - mStableInsets.bottom; float offscreenFraction = (float) (mBounds.bottom - displaySize.y) / mBounds.height(); if (mBounds.bottom > y) { float offscreenFraction = (float) (mBounds.bottom - y) / mBounds.height(); return offscreenFraction >= DISMISS_OFFSCREEN_FRACTION; return offscreenFraction >= DISMISS_OFFSCREEN_FRACTION; } } return false; return false; Loading