/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/ |
D | PipSnapAlgorithm.java | 37 public float getSnapFraction(Rect stackBounds, Rect movementBounds) { in getSnapFraction() argument 38 return getSnapFraction(stackBounds, movementBounds, STASH_TYPE_NONE); in getSnapFraction() 57 public float getSnapFraction(Rect stackBounds, Rect movementBounds, in getSnapFraction() argument 60 snapRectToClosestEdge(stackBounds, movementBounds, tmpBounds, stashType); in getSnapFraction() 61 final float widthFraction = (float) (tmpBounds.left - movementBounds.left) in getSnapFraction() 62 / movementBounds.width(); in getSnapFraction() 63 final float heightFraction = (float) (tmpBounds.top - movementBounds.top) in getSnapFraction() 64 / movementBounds.height(); in getSnapFraction() 65 if (tmpBounds.top == movementBounds.top) { in getSnapFraction() 67 } else if (tmpBounds.left == movementBounds.right) { in getSnapFraction() [all …]
|
D | PipBoundsAlgorithm.java | 304 final Rect movementBounds = getMovementBounds(defaultBounds); in getDefaultBounds() local 305 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds() 321 final Rect movementBounds = getMovementBounds(defaultBounds); in getDefaultBounds() local 322 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds() 357 final Rect movementBounds = new Rect(); in getMovementBounds() local 358 getInsetBounds(movementBounds); in getMovementBounds() 361 getMovementBounds(stackBounds, movementBounds, movementBounds, in getMovementBounds() 365 return movementBounds; in getMovementBounds() 394 public float getSnapFraction(Rect stackBounds, Rect movementBounds) { in getSnapFraction() argument 395 return mSnapAlgorithm.getSnapFraction(stackBounds, movementBounds); in getSnapFraction() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/ |
D | TvPipKeepClearAlgorithm.kt | 71 private var movementBounds = Rect() in <lambda>() variable in com.android.wm.shell.pip.tv.TvPipKeepClearAlgorithm 154 it.contains(movementBounds) -> null in <lambda>() 285 val movementBounds = transformedMovementBounds in <lambda>() constant 293 movementBounds.offsetCopy(movementBounds.width() + pipAreaPadding, 0) in <lambda>() 299 val minLeft = movementBounds.left + pipAnchorBounds.width() in <lambda>() 316 val maxDY = if (event.unrestricted) movementBounds.height() else maxRestrictedDY in <lambda>() 318 val isOnScreen = candidate.top > movementBounds.top in <lambda>() 329 val maxDY = if (event.unrestricted) movementBounds.height() else maxRestrictedDY in <lambda>() 331 val isOnScreen = candidate.bottom < movementBounds.bottom in <lambda>() 435 if (movementBounds == bounds) { in <lambda>() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PipResizeGestureHandler.java | 367 private void snapToMovementBoundsEdge(Rect bounds, Rect movementBounds) { in snapToMovementBoundsEdge() argument 371 final int fromLeft = Math.abs(leftEdge - movementBounds.left); in snapToMovementBoundsEdge() 372 final int fromRight = Math.abs(movementBounds.right - leftEdge); in snapToMovementBoundsEdge() 377 ? movementBounds.left : movementBounds.right; in snapToMovementBoundsEdge() 392 final Rect movementBounds = mPipBoundsAlgorithm.getMovementBounds(finalBounds); 395 snapToMovementBoundsEdge(finalBounds, movementBounds); 428 final Rect movementBounds = mPipBoundsAlgorithm 432 snapToMovementBoundsEdge(mLastResizeBounds, movementBounds); 435 mLastResizeBounds, movementBounds);
|
D | PipMotionHelper.java | 482 float animateToExpandedState(Rect expandedBounds, Rect movementBounds, 485 movementBounds);
|
D | PipTouchHandler.java | 1037 Rect movementBounds = new Rect(); 1039 movementBounds, mIsImeShowing ? mImeHeight : 0); 1040 return movementBounds;
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/ |
D | PipResizeGestureHandler.java | 375 private void snapToMovementBoundsEdge(Rect bounds, Rect movementBounds) { in snapToMovementBoundsEdge() argument 379 final int fromLeft = Math.abs(leftEdge - movementBounds.left); in snapToMovementBoundsEdge() 380 final int fromRight = Math.abs(movementBounds.right - leftEdge); in snapToMovementBoundsEdge() 385 ? movementBounds.left : movementBounds.right; in snapToMovementBoundsEdge() 400 final Rect movementBounds = mPipBoundsAlgorithm.getMovementBounds(finalBounds); 403 snapToMovementBoundsEdge(finalBounds, movementBounds); 441 final Rect movementBounds = mPipBoundsAlgorithm 445 snapToMovementBoundsEdge(mLastResizeBounds, movementBounds); 448 mLastResizeBounds, movementBounds);
|
D | PipTouchHandler.java | 1047 Rect movementBounds = new Rect(); 1049 movementBounds, mIsImeShowing ? mImeHeight : 0); 1050 return movementBounds;
|
D | PipMotionHelper.java | 474 float animateToExpandedState(Rect expandedBounds, Rect movementBounds, 477 movementBounds);
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/tv/ |
D | TvPipKeepClearAlgorithmTest.kt | 51 private lateinit var movementBounds: Rect variable in com.android.wm.shell.pip.tv.TvPipKeepClearAlgorithmTest 62 movementBounds = Rect(0, 0, SCREEN_SIZE.width, SCREEN_SIZE.height) in setup() 63 movementBounds.inset(SCREEN_EDGE_INSET, SCREEN_EDGE_INSET) in setup() 72 algorithm.setMovementBounds(movementBounds) in setup() 561 Gravity.apply(gravity, pipRect.width(), pipRect.height(), movementBounds, expectedBounds) in testAnchorPositionWithInsets() 583 Gravity.apply(gravity, pipSize.width, pipSize.height, movementBounds, expectedBounds) in getExpectedAnchorBounds()
|