# HG changeset patch # User nikita@localhost # Date 1245916964 -7200 # Node ID 0af8e2bbb107426931c0ebd16ba13acb63c08a89 # Parent b952180fd935319a7f2689e9a60238e11a596c90# Parent 2fae05fe318c519025f5e1b9479d17a1baa2b22e merge diff -r b952180fd935 -r 0af8e2bbb107 res/values/strings.xml --- a/res/values/strings.xml Thu Jun 25 10:02:31 2009 +0200 +++ b/res/values/strings.xml Thu Jun 25 10:02:44 2009 +0200 @@ -63,6 +63,7 @@ Yes No + Login: Email: @@ -99,7 +100,6 @@ No status set - Type here your status message : Beem - Change status diff -r b952180fd935 -r 0af8e2bbb107 src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Thu Jun 25 10:02:31 2009 +0200 +++ b/src/com/beem/project/beem/BeemService.java Thu Jun 25 10:02:44 2009 +0200 @@ -17,6 +17,7 @@ import android.app.Service; import android.content.Intent; import android.content.SharedPreferences; +import android.content.SharedPreferences.Editor; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; @@ -159,7 +160,11 @@ sendNotification(id, notif); } }, filter); - Log.i("BeemService", "onConnect()"); + // set status connect in the preferences + // private static final int AVAILABLE_IDX = 5; + Editor edit = mSettings.edit(); + edit.putInt(getString(R.string.PreferenceStatus), 1); + edit.commit(); } @Override diff -r b952180fd935 -r 0af8e2bbb107 src/com/beem/project/beem/service/BeemChatManager.java --- a/src/com/beem/project/beem/service/BeemChatManager.java Thu Jun 25 10:02:31 2009 +0200 +++ b/src/com/beem/project/beem/service/BeemChatManager.java Thu Jun 25 10:02:44 2009 +0200 @@ -104,7 +104,6 @@ public void processMessage(Chat chat, Message message) { ChatAdapter newchat = getChat(chat); try { - Log.d(TAG, message.getBody()); if (message.getBody() != null) newchat.addMessage(new com.beem.project.beem.service.Message(message)); final int n = mRemoteMessageListeners.beginBroadcast(); diff -r b952180fd935 -r 0af8e2bbb107 src/com/beem/project/beem/service/Contact.java --- a/src/com/beem/project/beem/service/Contact.java Thu Jun 25 10:02:31 2009 +0200 +++ b/src/com/beem/project/beem/service/Contact.java Thu Jun 25 10:02:44 2009 +0200 @@ -306,8 +306,11 @@ */ public Uri toUri() { StringBuilder build = new StringBuilder("xmpp:"); - build.append(StringUtils.parseName(mJID)).append('@').append( - StringUtils.parseServer(mJID)); + String name = StringUtils.parseName(mJID); + build.append(name); + if (! "".equals(name)) + build.append('@'); + build.append(StringUtils.parseServer(mJID)); Uri u = Uri.parse(build.toString()); return u; } diff -r b952180fd935 -r 0af8e2bbb107 src/com/beem/project/beem/ui/SendIM.java --- a/src/com/beem/project/beem/ui/SendIM.java Thu Jun 25 10:02:31 2009 +0200 +++ b/src/com/beem/project/beem/ui/SendIM.java Thu Jun 25 10:02:44 2009 +0200 @@ -130,6 +130,8 @@ if (mContactName == null || "".equals(mContactName)) { mContactName = mContact.getJID(); mContactName = StringUtils.parseName(mContactName); + if ("".equals(mContactName)) + mContactName = mContact.getJID(); } mLogin.setText(mContactName); } @@ -218,7 +220,8 @@ protected void onPause() { super.onPause(); try { - mChat.setOpen(false); + if (mChat!=null) + mChat.setOpen(false); } catch (RemoteException e) { Log.d(TAG, "Error while closing chat", e); } @@ -243,8 +246,6 @@ protected void onStart() { super.onStart(); // TODO cancel the notification if any - if (mContact == null) - mContact = getIntent().getParcelableExtra("contact"); try { if (mRoster != null) mContact = mRoster.getContact(mContact.getJID());