Default server settings removed

Now when you configure a new server connection the input boxes will
appear clean instead of with default garbage.

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
This commit is contained in:
Óscar García Amor 2018-04-07 17:23:23 +02:00
parent d35888213b
commit 8b58691246
2 changed files with 5 additions and 6 deletions

View File

@ -193,20 +193,20 @@ public class ServerSettingsFragment extends PreferenceFragment
private void updatePassword() { private void updatePassword() {
serverPasswordPref.setText(sharedPreferences serverPasswordPref.setText(sharedPreferences
.getString(Constants.PREFERENCES_KEY_PASSWORD + serverId, "***")); .getString(Constants.PREFERENCES_KEY_PASSWORD + serverId,
serverPasswordPref.setSummary("***"); ""));
} }
private void updateUsername() { private void updateUsername() {
serverUsernamePref.setText(sharedPreferences serverUsernamePref.setText(sharedPreferences
.getString(Constants.PREFERENCES_KEY_USERNAME + serverId, .getString(Constants.PREFERENCES_KEY_USERNAME + serverId,
getString(R.string.settings_server_username))); ""));
} }
private void updateUrl() { private void updateUrl() {
final String serverUrl = sharedPreferences final String serverUrl = sharedPreferences
.getString(Constants.PREFERENCES_KEY_SERVER_URL + serverId, .getString(Constants.PREFERENCES_KEY_SERVER_URL + serverId,
getString(R.string.settings_server_address_unset)); "http://");
serverUrlPref.setText(serverUrl); serverUrlPref.setText(serverUrl);
serverUrlPref.setSummary(serverUrl); serverUrlPref.setSummary(serverUrl);
} }
@ -214,7 +214,7 @@ public class ServerSettingsFragment extends PreferenceFragment
private void updateName() { private void updateName() {
final String serverName = sharedPreferences final String serverName = sharedPreferences
.getString(Constants.PREFERENCES_KEY_SERVER_NAME + serverId, .getString(Constants.PREFERENCES_KEY_SERVER_NAME + serverId,
getString(R.string.settings_server_unused)); "");
serverNamePref.setText(serverName); serverNamePref.setText(serverName);
serverNamePref.setSummary(serverName); serverNamePref.setSummary(serverName);
} }

View File

@ -29,7 +29,6 @@
android:key="@string/settings.server_password" android:key="@string/settings.server_password"
android:persistent="false" android:persistent="false"
android:inputType="textPassword" android:inputType="textPassword"
android:summary="***"
android:title="@string/settings.server_password" android:title="@string/settings.server_password"
/> />
<CheckBoxPreference <CheckBoxPreference