diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2013-10-12 17:07:40 +0800 |
---|---|---|
committer | emancebo <emancebo@cyngn.com> | 2014-09-04 10:40:16 -0700 |
commit | 32980c28bcc9171412ce7949b1dbcde881b3827d (patch) | |
tree | 097fe1c139b41ac01090224afc3fe589c20ca237 /src | |
parent | c0ca5c121ebc584c1d4227d74b2b6c08e4de6fa3 (diff) | |
download | android_packages_apps_Gallery2-32980c28bcc9171412ce7949b1dbcde881b3827d.tar.gz android_packages_apps_Gallery2-32980c28bcc9171412ce7949b1dbcde881b3827d.tar.bz2 android_packages_apps_Gallery2-32980c28bcc9171412ce7949b1dbcde881b3827d.zip |
Gallery2: fix cropview shows abnormal if lock and rotate screen
The canvas value will effect the screenbounds value.
When screen is locked, the screen orientation will be force
changed to portrait but the screenbounds will still use
landscape value.
To fix this issue, if found screenbounds changed, we will make
dirty true to update the view.
CRs-Fixed: 557210
Change-Id: Ia84581d122da76f084117dfd0a195ce2784e18c9
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/filtershow/crop/CropView.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/crop/CropView.java b/src/com/android/gallery3d/filtershow/crop/CropView.java index bbb7cfd4c..f860c82c8 100644 --- a/src/com/android/gallery3d/filtershow/crop/CropView.java +++ b/src/com/android/gallery3d/filtershow/crop/CropView.java @@ -290,6 +290,12 @@ public class CropView extends View { if (mBitmap == null) { return; } + RectF mOriginalScreenBounds = new RectF(mScreenBounds); + mOriginalScreenBounds.inset(-mMargin, -mMargin); + if (mOriginalScreenBounds.width() != canvas.getWidth() + || mOriginalScreenBounds.height() != canvas.getHeight()) { + mDirty = true; + } if (mDirty) { mDirty = false; clearDisplay(); |