summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
index d5c7cd93d..b571e7124 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
@@ -698,10 +698,10 @@ public class WallpaperCropActivity extends Activity {
// Adjust the width
roundedTrueCrop.right = roundedTrueCrop.left + fullSize.getWidth();
}
- if (roundedTrueCrop.right > fullSize.getWidth()) {
+ if (roundedTrueCrop.right >= fullSize.getWidth()) {
// Adjust the left value
- int adjustment = roundedTrueCrop.left -
- Math.max(0, roundedTrueCrop.right - roundedTrueCrop.width());
+ int adjustment = Math.max(0,
+ roundedTrueCrop.right - fullSize.getWidth());
roundedTrueCrop.left -= adjustment;
roundedTrueCrop.right -= adjustment;
}
@@ -709,10 +709,10 @@ public class WallpaperCropActivity extends Activity {
// Adjust the height
roundedTrueCrop.bottom = roundedTrueCrop.top + fullSize.getHeight();
}
- if (roundedTrueCrop.bottom > fullSize.getHeight()) {
+ if (roundedTrueCrop.bottom >= fullSize.getHeight()) {
// Adjust the top value
- int adjustment = roundedTrueCrop.top -
- Math.max(0, roundedTrueCrop.bottom - roundedTrueCrop.height());
+ int adjustment = Math.max(0,
+ roundedTrueCrop.bottom - fullSize.getHeight());
roundedTrueCrop.top -= adjustment;
roundedTrueCrop.bottom -= adjustment;
}