Searched refs:snapFraction (Results 1 – 7 of 7) sorted by relevance
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/ |
D | PipSnapAlgorithmTest.java | 56 final float snapFraction = 0.25f; in testApplySnapFraction_topEdge() local 59 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_topEdge() 67 final float snapFraction = 1.5f; in testApplySnapFraction_rightEdge() local 70 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_rightEdge() 78 final float snapFraction = 2.25f; in testApplySnapFraction_bottomEdge() local 81 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_bottomEdge() 89 final float snapFraction = 3.75f; in testApplySnapFraction_leftEdge() local 92 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_leftEdge() 100 final float snapFraction = 2f; in testApplySnapFraction_notStashed_isNotOffBounds() local 103 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction, in testApplySnapFraction_notStashed_isNotOffBounds() [all …]
|
D | PipBoundsStateTest.java | 76 final float snapFraction = 0.5f; in testSetReentryState() local 78 mPipBoundsState.saveReentryState(size, snapFraction); in testSetReentryState() 82 assertEquals(snapFraction, state.getSnapFraction(), 0.01); in testSetReentryState() 88 final float snapFraction = 0.5f; in testClearReentryState() local 90 mPipBoundsState.saveReentryState(size, snapFraction); in testClearReentryState()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/ |
D | PipSnapAlgorithm.java | 88 public void applySnapFraction(Rect stackBounds, Rect movementBounds, float snapFraction) { in applySnapFraction() argument 89 if (snapFraction < 1f) { in applySnapFraction() 90 int offset = movementBounds.left + (int) (snapFraction * movementBounds.width()); in applySnapFraction() 92 } else if (snapFraction < 2f) { in applySnapFraction() 93 snapFraction -= 1f; in applySnapFraction() 94 int offset = movementBounds.top + (int) (snapFraction * movementBounds.height()); in applySnapFraction() 96 } else if (snapFraction < 3f) { in applySnapFraction() 97 snapFraction -= 2f; in applySnapFraction() 98 int offset = movementBounds.left + (int) ((1f - snapFraction) * movementBounds.width()); in applySnapFraction() 101 snapFraction -= 3f; in applySnapFraction() [all …]
|
D | PipBoundsAlgorithm.java | 225 final float snapFraction = mSnapAlgorithm.getSnapFraction(stackBounds, in transformBoundsToAspectRatio() local 255 mSnapAlgorithm.applySnapFraction(stackBounds, getMovementBounds(stackBounds), snapFraction); in transformBoundsToAspectRatio() 274 private Rect getDefaultBounds(float snapFraction, Size size) { in getDefaultBounds() argument 276 if (snapFraction != INVALID_SNAP_FRACTION && size != null) { in getDefaultBounds() 280 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds() 302 if (snapFraction != INVALID_SNAP_FRACTION) { in getDefaultBounds() 305 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds() 385 public void applySnapFraction(Rect stackBounds, float snapFraction) { in applySnapFraction() argument 387 mSnapAlgorithm.applySnapFraction(stackBounds, movementBounds, snapFraction); in applySnapFraction()
|
D | PipBoundsState.java | 479 PipReentryState(@Nullable Size size, float snapFraction) { in PipReentryState() argument 481 mSnapFraction = snapFraction; in PipReentryState()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PipController.java | 459 final float snapFraction = pipSnapAlgorithm.getSnapFraction(postChangeStackBounds, in onDisplayChanged() local 470 snapFraction, mPipBoundsState.getStashedState(), in onDisplayChanged() 586 float snapFraction = mPipBoundsAlgorithm.getSnapFraction(pipBounds); in saveReentryState() local 590 mPipBoundsState.saveReentryState(reentrySize, snapFraction); in saveReentryState() 592 mPipBoundsState.saveReentryState(null /* bounds */, snapFraction); in saveReentryState() 673 final float snapFraction = pipSnapAlgorithm.getSnapFraction(postChangeStackBounds, in onDisplayRotationChanged() local 685 snapFraction, mPipBoundsState.getStashedState(), mPipBoundsState.getStashOffset(), in onDisplayRotationChanged()
|
D | PipResizeGestureHandler.java | 539 final float snapFraction = mPipBoundsAlgorithm.getSnapFraction( in finishResize() 541 mPipBoundsAlgorithm.applySnapFraction(mLastResizeBounds, snapFraction); in finishResize()
|