OSDN Git Service

Fix black screen when viewing Gmail image file attachment.
authorChih-Chung Chang <chihchung@google.com>
Mon, 30 Apr 2012 18:25:09 +0000 (02:25 +0800)
committerThe Android Automerger <android-build@android.com>
Mon, 30 Apr 2012 21:59:14 +0000 (14:59 -0700)
Bug: 6415848

Change-Id: Iec369866be6b5546fbd8cb77eb95a29f92e00b84

src/com/android/gallery3d/ui/PositionController.java

index ac0d191..03fe65b 100644 (file)
@@ -1012,7 +1012,8 @@ class PositionController {
         float hFactor = 1.0f;
         int viewW, viewH;
 
-        if (!mFilmMode && mConstrained && b == mBoxes.get(0)) {
+        if (!mFilmMode && mConstrained && !mConstrainedFrame.isEmpty()
+                && b == mBoxes.get(0)) {
             viewW = mConstrainedFrame.width();
             viewH = mConstrainedFrame.height();
         } else {