# HG changeset patch # User Vincent Veronis # Date 1255279156 -7200 # Node ID a57f61c382e06e0479fa45c71819fee0f98db64a # Parent a742b3208242b50b132a6c5f7e784ae05666a5a9 Correction bug multi ajout meme user. diff -r a742b3208242 -r a57f61c382e0 .classpath --- a/.classpath Fri Oct 09 16:10:50 2009 +0200 +++ b/.classpath Sun Oct 11 18:39:16 2009 +0200 @@ -1,29 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r a742b3208242 -r a57f61c382e0 res/layout/jingle_call_activity.xml --- a/res/layout/jingle_call_activity.xml Fri Oct 09 16:10:50 2009 +0200 +++ b/res/layout/jingle_call_activity.xml Sun Oct 11 18:39:16 2009 +0200 @@ -1,6 +1,6 @@ diff -r a742b3208242 -r a57f61c382e0 res/values-en/strings.xml --- a/res/values-en/strings.xml Fri Oct 09 16:10:50 2009 +0200 +++ b/res/values-en/strings.xml Sun Oct 11 18:39:16 2009 +0200 @@ -48,6 +48,7 @@ Error Contact not added Error Login Bad form + Contact already exist Beem - Chat diff -r a742b3208242 -r a57f61c382e0 res/values-fr/strings.xml --- a/res/values-fr/strings.xml Fri Oct 09 16:10:50 2009 +0200 +++ b/res/values-fr/strings.xml Sun Oct 11 18:39:16 2009 +0200 @@ -48,6 +48,7 @@ Erreur Contact pas ajouté Error Nom d\'utilisateur Mauvais formulaire + Contact déjà ajouté Beem - Chat @@ -224,6 +225,7 @@ Tous les contacts Aucun groupe + diff -r a742b3208242 -r a57f61c382e0 src/com/beem/project/beem/jingle/demo/JingleCallActivity.java --- a/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Fri Oct 09 16:10:50 2009 +0200 +++ b/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Sun Oct 11 18:39:16 2009 +0200 @@ -47,8 +47,8 @@ java.security.Security.addProvider(new com.sun.security.sasl.Provider()); super.onCreate(savedInstanceState); setContentView(R.layout.jingle_call_activity); - // localhost mConf = new ConnectionConfiguration("10.0.2.2", 5222); - mConf = new ConnectionConfiguration("elyzion.net", DEFAULT_XMPP_PORT); + mConf = new ConnectionConfiguration("10.0.2.2", 5222); + //mConf = new ConnectionConfiguration("elyzion.net", DEFAULT_XMPP_PORT); mConf.setSecurityMode(SecurityMode.required); mEdJID = (EditText) findViewById(R.id.jingledemocalljid); mEdPassword = (EditText) findViewById(R.id.jingledemocallpassword); diff -r a742b3208242 -r a57f61c382e0 src/com/beem/project/beem/ui/AddContact.java --- a/src/com/beem/project/beem/ui/AddContact.java Fri Oct 09 16:10:50 2009 +0200 +++ b/src/com/beem/project/beem/ui/AddContact.java Sun Oct 11 18:39:16 2009 +0200 @@ -136,10 +136,16 @@ if (mXmppFacade != null) { if (mXmppFacade.getRoster().getContact(login) != null) mGroup.addAll(mXmppFacade.getRoster().getContact(login).getGroups()); + if (mXmppFacade.getRoster().getContact(login) != null) { + Toast.makeText(AddContact.this, getString(R.string.AddCContactAlready), Toast.LENGTH_SHORT) + .show(); + return; + } if (mXmppFacade.getRoster().addContact(login, alias, mGroup.toArray(new String[mGroup.size()])) == null) { Toast.makeText(AddContact.this, getString(R.string.AddCContactAddedError), Toast.LENGTH_SHORT) .show(); return; + } else { Toast.makeText(AddContact.this, getString(R.string.AddCContactAdded), Toast.LENGTH_SHORT) .show(); diff -r a742b3208242 -r a57f61c382e0 src/com/beem/project/beem/ui/ContactDialog.java --- a/src/com/beem/project/beem/ui/ContactDialog.java Fri Oct 09 16:10:50 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactDialog.java Sun Oct 11 18:39:16 2009 +0200 @@ -9,6 +9,7 @@ import android.content.ServiceConnection; import android.os.IBinder; import android.os.RemoteException; +import android.util.Log; import android.view.View; import android.widget.Button; @@ -76,7 +77,7 @@ try { // TODO permettre a l'user de choisir a quel ressource il veut // faire le call. - mXmppFacade.call(mContact.getJID() + "/BEEM"); + mXmppFacade.call(mContact.getJID() + "/psi"); } catch (RemoteException e) { e.printStackTrace(); } @@ -120,6 +121,7 @@ public void onClick(View v) { Activity a = ContactDialog.this.getOwnerActivity(); Intent i = new Intent(mContext, UserInfo.class); + Log.i("OOO", mContact.getJID()); i.putExtra("contact_contactdialog", mContact.getJID()); a.startActivity(i); dismiss(); diff -r a742b3208242 -r a57f61c382e0 src/com/beem/project/beem/ui/UserInfo.java --- a/src/com/beem/project/beem/ui/UserInfo.java Fri Oct 09 16:10:50 2009 +0200 +++ b/src/com/beem/project/beem/ui/UserInfo.java Sun Oct 11 18:39:16 2009 +0200 @@ -341,7 +341,10 @@ mRoster = mXmppFacade.getRoster(); mJID = getIntent().getStringExtra("contact_contactdialog"); mContact = mRoster.getContact(mJID); - mTextAlias.setText(mContact.getName()); + if (mContact.getName() != null) + mTextAlias.setText(mContact.getName()); + else + mTextAlias.setText(mContact.getJID()); mGalleryGroups.setAdapter(new BeemGroups(UserInfo.this, mContact.getGroups())); setTitle(mJID); } catch (RemoteException e) {