1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-13 18:58:57 +00:00

port is a string now because none of the stock preference widgets will do

a number...
This commit is contained in:
Greg Alexander 2014-12-17 18:39:57 -05:00
parent bbcb048996
commit e49cf68feb

View File

@ -17,7 +17,13 @@ public class Prefs {
return pref.getBoolean("onboot", false);
}
public static int get_port() {
return pref.getInt("port", 2222);
int ret;
try {
ret = Integer.valueOf(pref.getString("port", "2222"));
} catch (Exception e) {
ret = 2222;
}
return ret;
}
public static String get_path() {
return pref.getString("path", "/sdcard/ssh");