Home
last modified time | relevance | path

Searched refs:snapFraction (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/core/java/com/android/internal/policy/
DPipSnapAlgorithm.java304 public void applySnapFraction(Rect stackBounds, Rect movementBounds, float snapFraction) { in applySnapFraction() argument
305 if (snapFraction < 1f) { in applySnapFraction()
306 int offset = movementBounds.left + (int) (snapFraction * movementBounds.width()); in applySnapFraction()
308 } else if (snapFraction < 2f) { in applySnapFraction()
309 snapFraction -= 1f; in applySnapFraction()
310 int offset = movementBounds.top + (int) (snapFraction * movementBounds.height()); in applySnapFraction()
312 } else if (snapFraction < 3f) { in applySnapFraction()
313 snapFraction -= 2f; in applySnapFraction()
314 int offset = movementBounds.left + (int) ((1f - snapFraction) * movementBounds.width()); in applySnapFraction()
317 snapFraction -= 3f; in applySnapFraction()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DPinnedStackController.java247 final float snapFraction = mSnapAlgorithm.getSnapFraction(stackBounds, in transformBoundsToAspectRatio() local
256 mSnapAlgorithm.applySnapFraction(stackBounds, getMovementBounds(stackBounds), snapFraction); in transformBoundsToAspectRatio()
292 Rect getDefaultBounds(float snapFraction) { in getDefaultBounds() argument
300 if (snapFraction != INVALID_SNAP_FRACTION) { in getDefaultBounds()
303 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds()
347 final float snapFraction = getSnapFraction(postChangeStackBounds); in onTaskStackBoundsChanged() local
355 snapFraction); in onTaskStackBoundsChanged()