/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/ |
D | PipSnapAlgorithmTest.java | 58 final float snapFraction = 0.25f; in testApplySnapFraction_topEdge() local 61 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_topEdge() 69 final float snapFraction = 1.5f; in testApplySnapFraction_rightEdge() local 72 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_rightEdge() 80 final float snapFraction = 2.25f; in testApplySnapFraction_bottomEdge() local 83 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_bottomEdge() 91 final float snapFraction = 3.75f; in testApplySnapFraction_leftEdge() local 94 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_leftEdge() 102 final float snapFraction = 2f; in testApplySnapFraction_notStashed_isNotOffBounds() local 105 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction, in testApplySnapFraction_notStashed_isNotOffBounds() [all …]
|
D | PipBoundsStateTest.java | 117 final float snapFraction = 0.5f; in testSetReentryState() local 119 mPipBoundsState.saveReentryState(snapFraction); in testSetReentryState() 122 assertEquals(snapFraction, state.getSnapFraction(), 0.01); in testSetReentryState() 127 final float snapFraction = 0.5f; in testClearReentryState() local 129 mPipBoundsState.saveReentryState(snapFraction); in testClearReentryState()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/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 | 277 final float snapFraction = mSnapAlgorithm.getSnapFraction(stackBounds, in transformBoundsToAspectRatio() local 292 mSnapAlgorithm.applySnapFraction(stackBounds, getMovementBounds(stackBounds), snapFraction); in transformBoundsToAspectRatio() 299 private Rect getDefaultBounds(float snapFraction, Size size) { in getDefaultBounds() argument 301 if (snapFraction != INVALID_SNAP_FRACTION && size != null) { in getDefaultBounds() 305 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds() 319 if (snapFraction != INVALID_SNAP_FRACTION) { in getDefaultBounds() 322 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds() 401 public void applySnapFraction(Rect stackBounds, float snapFraction) { in applySnapFraction() argument 403 mSnapAlgorithm.applySnapFraction(stackBounds, movementBounds, snapFraction); in applySnapFraction()
|
D | PhonePipKeepClearAlgorithm.java | 88 float snapFraction = pipBoundsAlgorithm.getSnapFraction(startingBounds); in adjust() local 91 if (snapFraction >= 0.5f && snapFraction < 2.5f) { in adjust()
|
D | PipBoundsState.java | 638 PipReentryState(float boundsScale, float snapFraction) { in PipReentryState() argument 640 mSnapFraction = snapFraction; in PipReentryState()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/ |
D | PipResizeGestureHandler.java | 396 void userResizeTo(Rect bounds, float snapFraction) { 406 mPipBoundsAlgorithm.applySnapFraction(finalBounds, snapFraction); 447 final float snapFraction = mPipBoundsAlgorithm.getSnapFraction( local 449 mPipBoundsAlgorithm.applySnapFraction(mLastResizeBounds, snapFraction); 527 float snapFraction = mPipBoundsAlgorithm.getSnapFraction( in onPipTransitionStateChanged() local 531 boolean inTopHalf = snapFraction < 1.5 || snapFraction > 3.5; in onPipTransitionStateChanged()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PipResizeGestureHandler.java | 388 void userResizeTo(Rect bounds, float snapFraction) { 398 mPipBoundsAlgorithm.applySnapFraction(finalBounds, snapFraction); 434 final float snapFraction = mPipBoundsAlgorithm.getSnapFraction( local 436 mPipBoundsAlgorithm.applySnapFraction(mLastResizeBounds, snapFraction);
|
D | PipController.java | 801 final float snapFraction = pipSnapAlgorithm.getSnapFraction(postChangeBounds, in onDisplayChangedUncheck() local 819 snapFraction, mPipBoundsState.getStashedState(), in onDisplayChangedUncheck() 1061 float snapFraction = mPipBoundsAlgorithm.getSnapFraction(pipBounds); in saveReentryState() local 1062 mPipBoundsState.saveReentryState(snapFraction); in saveReentryState() 1146 final float snapFraction = pipSnapAlgorithm.getSnapFraction(postChangeStackBounds, in onDisplayRotationChanged() local 1163 snapFraction, mPipBoundsState.getStashedState(), mPipBoundsState.getStashOffset(), in onDisplayRotationChanged()
|