Correction bug dans les settings.
Erreur lors de la connection au serveur beem-project / elyzion
--- a/src/com/beem/project/beem/BeemService.java Wed Apr 22 00:25:01 2009 +0200
+++ b/src/com/beem/project/beem/BeemService.java Wed Apr 22 11:48:49 2009 +0200
@@ -77,7 +77,7 @@
mLogin = mSettings.getString(getString(R.string.PreferenceLoginKey), "");
mPassword = mSettings.getString(getString(R.string.PreferencePasswordKey), "");
mHost = mSettings.getString(getString(R.string.PreferenceHostKey), "");
- mHost = "10.0.2.2";
+ //mHost = "10.0.2.2";
initConnectionConfig();
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
mConnection = new XmppConnectionAdapter(mConnectionConfiguration, mLogin, mPassword);
@@ -128,7 +128,7 @@
String phost = mSettings.getString(getString(R.string.PreferenceProxyHost), "");
String puser = mSettings.getString(getString(R.string.PreferenceProxyUser), "");
String ppass = mSettings.getString(getString(R.string.PreferenceProxyPassword), "");
- int pport = mSettings.getInt(getString(R.string.PreferenceProxyPort), 3128);
+ int pport = mSettings.getInt(getString(R.string.PreferenceProxyPort), 1080);
ProxyInfo.ProxyType type = ProxyType.valueOf(stype);
mProxyInfo = new ProxyInfo(type, phost, pport, puser, ppass);
mConnectionConfiguration = new ConnectionConfiguration(mHost, mProxyInfo);
--- a/src/com/beem/project/beem/ui/ContactListSettings.java Wed Apr 22 00:25:01 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactListSettings.java Wed Apr 22 11:48:49 2009 +0200
@@ -72,6 +72,7 @@
editor.putString(getString(R.string.PreferenceProxyType), value);
mIsChanged = true;
}
+ editor.commit();
}
@Override
@@ -105,8 +106,8 @@
editor.putString(getString(R.string.PreferenceProxyHost), getWidgetText(R.id.proxy_host));
mIsChanged = true;
}
- if (isChanged(R.id.proxy_port, R.string.PreferenceProxyPort)) {
- editor.putString(getString(R.string.PreferenceProxyPort), getWidgetText(R.id.proxy_port));
+ if (Integer.parseInt(getWidgetText(R.id.proxy_port)) != mSettings.getInt(getString(R.string.PreferenceProxyPort), 1080) ) {
+ editor.putInt(getString(R.string.PreferenceProxyPort), Integer.parseInt(getWidgetText(R.id.proxy_port)));
mIsChanged = true;
}
if (isChanged(R.id.proxy_login, R.string.PreferenceProxyUser)) {
@@ -144,7 +145,7 @@
e = (EditText) findViewById(R.id.proxy_host);
e.setText(getPreferenceString(R.string.PreferenceProxyHost));
e = (EditText) findViewById(R.id.proxy_port);
- e.setText(getPreferenceString(R.string.PreferenceProxyPort));
+ e.setText(String.valueOf(mSettings.getInt(getString(R.string.PreferenceProxyPort), 1080)));
e = (EditText) findViewById(R.id.proxy_login);
e.setText(getPreferenceString(R.string.PreferenceProxyUser));
e = (EditText) findViewById(R.id.proxy_pwd);