# HG changeset patch # User Da Risk # Date 1266092210 -3600 # Node ID f4349711b6c88a0bee82a2eb6f0fc7cbaef3b2b2 # Parent c6f9f2fcaf0670e588d03abe84180703d7e16561# Parent baaee1877b2bee527d67cd2fc731cb18a8344cb3 merge diff -r c6f9f2fcaf06 -r f4349711b6c8 .classpath --- a/.classpath Sat Feb 13 21:11:50 2010 +0100 +++ b/.classpath Sat Feb 13 21:16:50 2010 +0100 @@ -1,10 +1,9 @@ - - - - - - - - - - + + + + + + + + + diff -r c6f9f2fcaf06 -r f4349711b6c8 AndroidManifest.xml --- a/AndroidManifest.xml Sat Feb 13 21:11:50 2010 +0100 +++ b/AndroidManifest.xml Sat Feb 13 21:16:50 2010 +0100 @@ -65,12 +65,13 @@ android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" /> - + @@ -85,6 +86,7 @@ - - + + diff -r c6f9f2fcaf06 -r f4349711b6c8 default.properties --- a/default.properties Sat Feb 13 21:11:50 2010 +0100 +++ b/default.properties Sat Feb 13 21:16:50 2010 +0100 @@ -10,5 +10,5 @@ # Indicates whether an apk should be generated for each density. split.density=false # Project target. -target=android-4 +target=android-7 apk-configurations= diff -r c6f9f2fcaf06 -r f4349711b6c8 res/values-fr/strings.xml --- a/res/values-fr/strings.xml Sat Feb 13 21:11:50 2010 +0100 +++ b/res/values-fr/strings.xml Sat Feb 13 21:16:50 2010 +0100 @@ -303,4 +303,33 @@ Non Mettre à jour + + + + Erreur lors de l\'authenfitication, mauvais login ou password + + Erreur survenu sur le serveur + bad-request + forbidden + item-not-found + conflict + feature-not-implemented + gone + jid-malformed + no-acceptable + not-allowed + not-authorized + payment-required + recipient-unavailable + redirect + registration-required + Serveur non trouvé + Pas de réponse du serveur + Erreur survenu sur le serveur + resource-constraint + service-unavailable + subscription-required + undefined-condition + unexpected-condition + request-timeout diff -r c6f9f2fcaf06 -r f4349711b6c8 res/values/strings.xml --- a/res/values/strings.xml Sat Feb 13 21:11:50 2010 +0100 +++ b/res/values/strings.xml Sat Feb 13 21:16:50 2010 +0100 @@ -287,4 +287,33 @@ No Update + + + + Error during authentication, bad login or password. + + Remote server error + bad-request + forbidden + item-not-found + conflict + feature-not-implemented + gone + jid-malformed + no-acceptable + not-allowed + not-authorized + payment-required + recipient-unavailable + redirect + registration-required + Remote server not found + No server response + Remote server error + resource-constraint + service-unavailable + subscription-required + undefined-condition + unexpected-condition + request-timeout diff -r c6f9f2fcaf06 -r f4349711b6c8 src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Sat Feb 13 21:11:50 2010 +0100 +++ b/src/com/beem/project/beem/BeemService.java Sat Feb 13 21:16:50 2010 +0100 @@ -40,7 +40,7 @@ Flavien Astraud, November 26, 2009 Head of the EIP Laboratory. -*/ + */ package com.beem.project.beem; import org.jivesoftware.smack.ConnectionConfiguration; @@ -138,7 +138,7 @@ * Initialise la configuration de la connexion. */ private void initConnectionConfig() { - java.security.Security.addProvider(new com.sun.security.sasl.Provider()); + //java.security.Security.addProvider(new com.sun.security.sasl.Provider()); mUseProxy = mSettings.getBoolean("settings_key_proxy_use", false); if (mUseProxy) { String stype = mSettings.getString("settings_key_proxy_type", "HTTP"); @@ -311,6 +311,10 @@ * @param pm The ProviderManager. */ private void configure(ProviderManager pm) { + // Privacy + pm.addIQProvider("query", "jabber:iq:privacy", new PrivacyProvider()); + + /* // Private Data Storage pm.addIQProvider("query", "jabber:iq:private", new PrivateDataManager.PrivateDataIQProvider()); // Time @@ -377,8 +381,7 @@ pm.addIQProvider("open", "http://jabber.org/protocol/ibb", new IBBProviders.Open()); pm.addIQProvider("close", "http://jabber.org/protocol/ibb", new IBBProviders.Close()); pm.addExtensionProvider("data", "http://jabber.org/protocol/ibb", new IBBProviders.Data()); - // Privacy - pm.addIQProvider("query", "jabber:iq:privacy", new PrivacyProvider()); + pm.addIQProvider("command", COMMAND_NAMESPACE, new AdHocCommandDataProvider()); pm.addExtensionProvider("malformed-action", COMMAND_NAMESPACE, new AdHocCommandDataProvider.MalformedActionError()); @@ -390,6 +393,7 @@ new AdHocCommandDataProvider.BadSessionIDError()); pm.addExtensionProvider("session-expired", COMMAND_NAMESPACE, new AdHocCommandDataProvider.SessionExpiredError()); + */ } } diff -r c6f9f2fcaf06 -r f4349711b6c8 src/com/beem/project/beem/service/XmppConnectionAdapter.java --- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Sat Feb 13 21:11:50 2010 +0100 +++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Sat Feb 13 21:16:50 2010 +0100 @@ -40,7 +40,7 @@ Flavien Astraud, November 26, 2009 Head of the EIP Laboratory. -*/ + */ package com.beem.project.beem.service; import org.jivesoftware.smack.ConnectionConfiguration; @@ -171,10 +171,17 @@ return true; } catch (XMPPException e) { Log.e(TAG, "Error while connecting", e); - if (!"".equals(e.getMessage())) - mErrorMsg = e.getMessage(); - else - mErrorMsg = e.toString(); + try { + String str = mService.getResources().getString( + mService.getResources().getIdentifier( + e.getXMPPError().getCondition().replace("-", "_"), "string", "com.beem.project.beem")); + mErrorMsg = str; + } catch(NullPointerException e2) { + if (!"".equals(e.getMessage())) + mErrorMsg = e.getMessage(); + else + mErrorMsg = e.toString(); + } } return false; } @@ -211,15 +218,12 @@ mService.resetStatus(); mService.initJingle(mAdaptee); - // triggerAsynchronousConnectEvent(); + // triggerAsynchronousConnectEvent(); changeStatus(Status.CONTACT_STATUS_AVAILABLE, mService.getServicePreference().getString("status_text", "")); return true; } catch (XMPPException e) { Log.e(TAG, "Error while connecting", e); - if (!"".equals(e.getMessage())) - mErrorMsg = e.getMessage(); - else - mErrorMsg = e.toString(); + mErrorMsg = mService.getString(R.string.error_login_authentication); return false; } }