Loading core/java/android/widget/EdgeEffect.java +4 −10 Original line number Original line Diff line number Diff line Loading @@ -626,20 +626,14 @@ public class EdgeEffect { // assume rotations of increments of 90 degrees // assume rotations of increments of 90 degrees float x = mTmpPoints[10] - mTmpPoints[8]; float x = mTmpPoints[10] - mTmpPoints[8]; float width = right - left; float width = right - left; float vecX = 0f; float vecX = dampStretchVector(Math.max(-1f, Math.min(1f, x / width))); if (width > 0) { vecX = dampStretchVector(Math.max(-1f, Math.min(1f, x / width))); } float y = mTmpPoints[11] - mTmpPoints[9]; float y = mTmpPoints[11] - mTmpPoints[9]; float height = bottom - top; float height = bottom - top; float vecY = 0f; float vecY = dampStretchVector(Math.max(-1f, Math.min(1f, y / height))); if (height > 0) { vecY = dampStretchVector(Math.max(-1f, Math.min(1f, y / height))); } boolean hasStretchVectors = Float.compare(vecX, 0) != 0 || Float.compare(vecY, 0) != 0; boolean hasValidVectors = Float.isFinite(vecX) && Float.isFinite(vecY); if (right > left && bottom > top && mWidth > 0 && mHeight > 0 && hasStretchVectors) { if (right > left && bottom > top && mWidth > 0 && mHeight > 0 && hasValidVectors) { renderNode.stretch( renderNode.stretch( left, left, top, top, Loading Loading
core/java/android/widget/EdgeEffect.java +4 −10 Original line number Original line Diff line number Diff line Loading @@ -626,20 +626,14 @@ public class EdgeEffect { // assume rotations of increments of 90 degrees // assume rotations of increments of 90 degrees float x = mTmpPoints[10] - mTmpPoints[8]; float x = mTmpPoints[10] - mTmpPoints[8]; float width = right - left; float width = right - left; float vecX = 0f; float vecX = dampStretchVector(Math.max(-1f, Math.min(1f, x / width))); if (width > 0) { vecX = dampStretchVector(Math.max(-1f, Math.min(1f, x / width))); } float y = mTmpPoints[11] - mTmpPoints[9]; float y = mTmpPoints[11] - mTmpPoints[9]; float height = bottom - top; float height = bottom - top; float vecY = 0f; float vecY = dampStretchVector(Math.max(-1f, Math.min(1f, y / height))); if (height > 0) { vecY = dampStretchVector(Math.max(-1f, Math.min(1f, y / height))); } boolean hasStretchVectors = Float.compare(vecX, 0) != 0 || Float.compare(vecY, 0) != 0; boolean hasValidVectors = Float.isFinite(vecX) && Float.isFinite(vecY); if (right > left && bottom > top && mWidth > 0 && mHeight > 0 && hasStretchVectors) { if (right > left && bottom > top && mWidth > 0 && mHeight > 0 && hasValidVectors) { renderNode.stretch( renderNode.stretch( left, left, top, top, Loading