diff options
| author | nicolasroard <nicolasroard@google.com> | 2012-10-25 23:42:41 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-25 23:42:41 -0700 |
| commit | 68971bbccc85866ea5d4194daa045d01edb8ae14 (patch) | |
| tree | fb650fd79c457568585ed9778f5d7e2c1027ffce | |
| parent | 8ca21874dd06cbaddf4a6ed5522d3612e88a6a6d (diff) | |
| parent | 8b3ce9b01275151b653ea138324e47eb66a7b47e (diff) | |
| download | android_packages_apps_Gallery2-68971bbccc85866ea5d4194daa045d01edb8ae14.tar.gz android_packages_apps_Gallery2-68971bbccc85866ea5d4194daa045d01edb8ae14.tar.bz2 android_packages_apps_Gallery2-68971bbccc85866ea5d4194daa045d01edb8ae14.zip | |
am 8b3ce9b0: Merge "Fix crash when showing history" into gb-ub-photos-arches
* commit '8b3ce9b01275151b653ea138324e47eb66a7b47e':
Fix crash when showing history
| -rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 3 | ||||
| -rw-r--r-- | src/com/android/gallery3d/filtershow/imageshow/ImageShow.java | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index 7b4ae6691..02acaeab1 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -457,6 +457,9 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, int accessoryPanelWidth = viewPanel.getWidth(); int mainViewWidth = findViewById(R.id.mainView).getWidth(); int mainPanelWidth = mImageShow.getDisplayedImageBounds().width(); + if (mainPanelWidth == 0) { + mainPanelWidth = mainViewWidth; + } int leftOver = mainViewWidth - mainPanelWidth - accessoryPanelWidth; if (leftOver < 0) { return -accessoryPanelWidth; diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java index bf22c891f..c113e5d92 100644 --- a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java +++ b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java @@ -83,7 +83,7 @@ public class ImageShow extends View implements OnGestureListener, private HistoryAdapter mHistoryAdapter = null; private ImageStateAdapter mImageStateAdapter = null; - private Rect mImageBounds = null; + private Rect mImageBounds = new Rect(); private boolean mTouchShowOriginal = false; private long mTouchShowOriginalDate = 0; |
