summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-05-05 01:03:35 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-05-05 01:03:35 -0700
commit44fba2a3719737b4aca0cd4ed7fbac77539a971d (patch)
tree40c1654e066afc43e8a9be6e69db36b724630260 /src/com
parente0e82563de27293c79995d5709a8b3f795945b2f (diff)
parent9d5d085de23c9c69b6101a7f9069147e94861779 (diff)
downloadandroid_packages_apps_Gallery2-44fba2a3719737b4aca0cd4ed7fbac77539a971d.tar.gz
android_packages_apps_Gallery2-44fba2a3719737b4aca0cd4ed7fbac77539a971d.tar.bz2
android_packages_apps_Gallery2-44fba2a3719737b4aca0cd4ed7fbac77539a971d.zip
Merge "Gallery2: Fix force closed when input long size at Export Flattened Image." into android_ui.lnx.1.2-dev
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/filtershow/ui/ExportDialog.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/filtershow/ui/ExportDialog.java b/src/com/android/gallery3d/filtershow/ui/ExportDialog.java
index 1b8d1b044..1b8625946 100644
--- a/src/com/android/gallery3d/filtershow/ui/ExportDialog.java
+++ b/src/com/android/gallery3d/filtershow/ui/ExportDialog.java
@@ -216,7 +216,11 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener
if (mWidthText.getText() != null) {
String value = String.valueOf(mWidthText.getText());
if (value.length() > 0) {
- width = Integer.parseInt(value);
+ try {
+ width = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ width = Integer.MAX_VALUE;
+ }
if (width > mOriginalBounds.width()) {
width = mOriginalBounds.width();
mWidthText.setText("" + width);
@@ -233,7 +237,11 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener
if (mHeightText.getText() != null) {
String value = String.valueOf(mHeightText.getText());
if (value.length() > 0) {
- height = Integer.parseInt(value);
+ try {
+ height = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ height = Integer.MAX_VALUE;
+ }
if (height > mOriginalBounds.height()) {
height = mOriginalBounds.height();
mHeightText.setText("" + height);