OSDN Git Service

Fixed a crash when an image with an odd width/height was selected
authorSelim Cinek <cinek@google.com>
Fri, 14 Mar 2014 17:19:35 +0000 (18:19 +0100)
committerSelim Cinek <cinek@google.com>
Fri, 14 Mar 2014 17:27:23 +0000 (18:27 +0100)
commite04e8b2a142f22bfeb8729e542f51d5510327eb9
tree03c9535619882e7eee0cc976839b9845531c423d
parent04960cd2e5968e83b26f4fbab23713a5d62af2fc
Fixed a crash when an image with an odd width/height was selected

Due to an internal rounding in the renderer, the calculations
for the cropping area could be slightly offset, getting out
of the image boundaries. I sanitized the rect by ensuring they
are inside the image.

Bug: 12174629
Change-Id: I5e08c83fe3e9cd48254fa6c8ba9cef77ab8a51a6
WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java