# HG changeset patch # User Vincent Veronis # Date 1255279194 -7200 # Node ID a8a3258a0fd4ae4cf804cfdb0204c2ffa4b5eda8 # Parent a57f61c382e06e0479fa45c71819fee0f98db64a# Parent 73179276b4aeecba88731c6b7a85bd28fcf43fe4 Merge. diff -r 73179276b4ae -r a8a3258a0fd4 .classpath --- a/.classpath Sun Oct 11 16:28:20 2009 +0200 +++ b/.classpath Sun Oct 11 18:39:54 2009 +0200 @@ -1,29 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 73179276b4ae -r a8a3258a0fd4 res/layout/jingle_call_activity.xml --- a/res/layout/jingle_call_activity.xml Sun Oct 11 16:28:20 2009 +0200 +++ b/res/layout/jingle_call_activity.xml Sun Oct 11 18:39:54 2009 +0200 @@ -1,6 +1,6 @@ diff -r 73179276b4ae -r a8a3258a0fd4 res/values-en/strings.xml --- a/res/values-en/strings.xml Sun Oct 11 16:28:20 2009 +0200 +++ b/res/values-en/strings.xml Sun Oct 11 18:39:54 2009 +0200 @@ -48,6 +48,7 @@ Error Contact not added Error Login Bad form + Contact already exist Beem - Chat diff -r 73179276b4ae -r a8a3258a0fd4 res/values-fr/strings.xml --- a/res/values-fr/strings.xml Sun Oct 11 16:28:20 2009 +0200 +++ b/res/values-fr/strings.xml Sun Oct 11 18:39:54 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 73179276b4ae -r a8a3258a0fd4 src/com/beem/project/beem/jingle/demo/JingleCallActivity.java --- a/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Sun Oct 11 16:28:20 2009 +0200 +++ b/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Sun Oct 11 18:39:54 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 73179276b4ae -r a8a3258a0fd4 src/com/beem/project/beem/ui/AddContact.java --- a/src/com/beem/project/beem/ui/AddContact.java Sun Oct 11 16:28:20 2009 +0200 +++ b/src/com/beem/project/beem/ui/AddContact.java Sun Oct 11 18:39:54 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 73179276b4ae -r a8a3258a0fd4 src/com/beem/project/beem/ui/ContactDialog.java --- a/src/com/beem/project/beem/ui/ContactDialog.java Sun Oct 11 16:28:20 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactDialog.java Sun Oct 11 18:39:54 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 73179276b4ae -r a8a3258a0fd4 src/com/beem/project/beem/ui/UserInfo.java --- a/src/com/beem/project/beem/ui/UserInfo.java Sun Oct 11 16:28:20 2009 +0200 +++ b/src/com/beem/project/beem/ui/UserInfo.java Sun Oct 11 18:39:54 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) {