aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorzeapo <mohamed@zenadi.com>2014-10-20 00:06:34 +0200
committerzeapo <mohamed@zenadi.com>2014-10-20 00:06:34 +0200
commitf134ca71f2dbcf307456d0326aeda999185c0858 (patch)
tree15caf4cef4754e068e2e860a59feab53ba3d7f58 /app/src/main
parent0c5c6947055e149c10cc190a5ef8f3ac07ba1a0a (diff)
Fix #19
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
index 39010a53..7c6c0da8 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
@@ -6,6 +6,7 @@ import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
+import java.text.ParseException;
import java.util.ArrayList;
import org.apache.commons.io.FileUtils;
@@ -220,7 +221,12 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne
// Make Show Time a user preference
// kLeZ: Changed to match the default for pass
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(container.getContext());
- final int SHOW_TIME = Integer.parseInt(settings.getString("general_show_time", "45"));
+ int SHOW_TIME;
+ try {
+ SHOW_TIME = Integer.parseInt(settings.getString("general_show_time", "45"));
+ } catch (NumberFormatException e) {
+ SHOW_TIME = 45;
+ }
this.pb.setMax(SHOW_TIME);
}