5
0
mirror of https://github.com/cwinfo/envayasms.git synced 2024-11-08 09:50:26 +00:00

assume http:// scheme for server URLs

This commit is contained in:
Jesse Young 2011-09-19 10:33:20 -07:00
parent 430aeca5e2
commit 3357de7e4e

View File

@ -74,6 +74,16 @@ public class Prefs extends PreferenceActivity implements OnSharedPreferenceChang
}
else if (key.equals("server_url"))
{
String serverUrl = sharedPreferences.getString("server_url", "");
// assume http:// scheme if none entered
if (serverUrl.length() > 0 && !serverUrl.contains("://"))
{
sharedPreferences.edit()
.putString("server_url", "http://" + serverUrl)
.commit();
}
app.log("Server URL changed to: " + app.getDisplayString(app.getServerUrl()));
}
else if (key.equals("phone_number"))