mirror of
https://github.com/cwinfo/envayasms.git
synced 2024-11-09 10:20:25 +00:00
assume http:// scheme for server URLs
This commit is contained in:
parent
430aeca5e2
commit
3357de7e4e
@ -74,6 +74,16 @@ public class Prefs extends PreferenceActivity implements OnSharedPreferenceChang
|
|||||||
}
|
}
|
||||||
else if (key.equals("server_url"))
|
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()));
|
app.log("Server URL changed to: " + app.getDisplayString(app.getServerUrl()));
|
||||||
}
|
}
|
||||||
else if (key.equals("phone_number"))
|
else if (key.equals("phone_number"))
|
||||||
|
Loading…
Reference in New Issue
Block a user