# HG changeset patch # User marseille # Date 1240602092 -7200 # Node ID e9d73490be9b259149d0a227d0654af6b8d9ef01 # Parent 393009fc82657d009647c24d885bc84c20d28f3e# Parent ec2072a6089ad0f882df6c6fbed354d9bd901b1f Ajout du message d'etat dans la contact list diff -r ec2072a6089a -r e9d73490be9b AndroidManifest.xml --- a/AndroidManifest.xml Fri Apr 24 21:20:06 2009 +0200 +++ b/AndroidManifest.xml Fri Apr 24 21:41:32 2009 +0200 @@ -2,7 +2,8 @@ - + @@ -31,5 +32,5 @@ - + diff -r ec2072a6089a -r e9d73490be9b res/drawable/away.png Binary file res/drawable/away.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/beem_contactlist_header_1.png Binary file res/drawable/beem_contactlist_header_1.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/buddie_robot.png Binary file res/drawable/buddie_robot.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/chat.png Binary file res/drawable/chat.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/connecting.png Binary file res/drawable/connecting.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/dnd.png Binary file res/drawable/dnd.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/error.png Binary file res/drawable/error.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/invisible.png Binary file res/drawable/invisible.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/logo.jpg Binary file res/drawable/logo.jpg has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/message.png Binary file res/drawable/message.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/notify_message.png Binary file res/drawable/notify_message.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/notify_signal.png Binary file res/drawable/notify_signal.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/online.png Binary file res/drawable/online.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/requested.png Binary file res/drawable/requested.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/scrollbar_vertical_thumb.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/drawable/scrollbar_vertical_thumb.xml Fri Apr 24 21:41:32 2009 +0200 @@ -0,0 +1,21 @@ + + + + + + + diff -r ec2072a6089a -r e9d73490be9b res/drawable/scrollbar_vertical_track.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/drawable/scrollbar_vertical_track.xml Fri Apr 24 21:41:32 2009 +0200 @@ -0,0 +1,21 @@ + + + + + + + diff -r ec2072a6089a -r e9d73490be9b res/drawable/signal.png Binary file res/drawable/signal.png has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/xmpp.jpg Binary file res/drawable/xmpp.jpg has changed diff -r ec2072a6089a -r e9d73490be9b res/drawable/xmpp.png Binary file res/drawable/xmpp.png has changed diff -r ec2072a6089a -r e9d73490be9b res/layout/contactlistcontact.xml --- a/res/layout/contactlistcontact.xml Fri Apr 24 21:20:06 2009 +0200 +++ b/res/layout/contactlistcontact.xml Fri Apr 24 21:41:32 2009 +0200 @@ -5,12 +5,13 @@ android:layout_height="wrap_content" android:paddingLeft="10px" android:paddingRight="10px" - android:background="@drawable/beem_sendim_header_1" android:gravity="center_vertical" > @@ -30,8 +31,11 @@ diff -r ec2072a6089a -r e9d73490be9b res/layout/contactlistgroup.xml diff -r ec2072a6089a -r e9d73490be9b res/layout/contactlistsettings.xml --- a/res/layout/contactlistsettings.xml Fri Apr 24 21:20:06 2009 +0200 +++ b/res/layout/contactlistsettings.xml Fri Apr 24 21:41:32 2009 +0200 @@ -2,90 +2,22 @@ - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + - - + + + + + - + + + + + + + + + + + + \ No newline at end of file diff -r ec2072a6089a -r e9d73490be9b res/layout/sendim.xml --- a/res/layout/sendim.xml Fri Apr 24 21:20:06 2009 +0200 +++ b/res/layout/sendim.xml Fri Apr 24 21:41:32 2009 +0200 @@ -7,31 +7,34 @@ android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:paddingLeft="10px" - android:paddingRight="10px" - android:background="@drawable/beem_sendim_header_1" android:gravity="center_vertical" > - + /> + android:paddingLeft="10sp" /> + android:paddingLeft="15sp" /> @@ -76,6 +79,9 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/beem_sendim_textview" + android:scrollbarTrackVertical="@drawable/scrollbar_vertical_track" + android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb" + android:scrollbarSize="12dip" android:layout_weight="1"> - - + + diff -r ec2072a6089a -r e9d73490be9b res/values/strings.xml --- a/res/values/strings.xml Fri Apr 24 21:20:06 2009 +0200 +++ b/res/values/strings.xml Fri Apr 24 21:41:32 2009 +0200 @@ -27,6 +27,7 @@ Jabber ID login password + service port proxy_host proxy_port @@ -64,5 +65,7 @@ Updating status Nothing to change + + You have got a new message diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/BeemApplication.java --- a/src/com/beem/project/beem/BeemApplication.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/BeemApplication.java Fri Apr 24 21:41:32 2009 +0200 @@ -5,6 +5,7 @@ import java.util.LinkedList; import java.util.List; + import android.app.Activity; import android.app.Application; import android.app.ProgressDialog; @@ -18,9 +19,13 @@ import android.os.Message; import android.os.RemoteException; import android.util.Log; +import android.widget.Toast; + import com.beem.project.beem.service.aidl.IBeemConnectionListener; import com.beem.project.beem.service.aidl.IXmppConnection; import com.beem.project.beem.service.aidl.IXmppFacade; +import com.beem.project.beem.ui.AddContact; +import com.beem.project.beem.ui.ContactList; import com.beem.project.beem.utils.Status; /** @@ -61,10 +66,10 @@ try { mConnection = mFacade.createConnection(); if (!mConnection.isAuthentificated()) { - mProgressDialog.show(); mConnection.addConnectionListener(mConnectionListener); mApplicationContext.startService(BeemApplication.SERVICE_INTENT); }else { + mProgressDialog.dismiss(); synchronized (mQueue) { for (Message msg : mQueue) { msg.sendToTarget(); @@ -111,6 +116,8 @@ */ public synchronized void startBeemService() { if (!mIsConnected) { + mProgressDialog.setMessage("Connecting..."); + mProgressDialog.show(); // the connection will be made on service connect mApplicationContext.bindService(BeemApplication.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE); } @@ -207,7 +214,6 @@ * Constructor. */ public ConnectionListener() { - } /** @@ -215,9 +221,7 @@ */ @Override public void connectionClosed() throws RemoteException { - // TODO Auto-generated method stub - Log.e("BeemApp", "test1"); - + Log.e(TAG, "Connection Close"); } /** @@ -252,8 +256,6 @@ */ @Override public void reconnectingIn(int seconds) throws RemoteException { - // TODO Auto-generated method stub - mProgressDialog.show(); } /** @@ -261,9 +263,6 @@ */ @Override public void reconnectionFailed() throws RemoteException { - // TODO Auto-generated method stub - Log.e("BeemApp", "test3"); - } /** @@ -271,8 +270,6 @@ */ @Override public void reconnectionSuccessful() throws RemoteException { - // TODO Auto-generated method stub - } @Override diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/BeemService.java Fri Apr 24 21:41:32 2009 +0200 @@ -49,6 +49,7 @@ private String mLogin; private String mPassword; private String mHost; + private String mService; private int mPort; private ConnectionConfiguration mConnectionConfiguration; private ProxyInfo mProxyInfo; @@ -83,6 +84,7 @@ mPassword = mSettings.getString(getString(R.string.PreferencePasswordKey), ""); mHost = mSettings.getString(getString(R.string.PreferenceHostKey), ""); mPort = mSettings.getInt(getString(R.string.PreferencePortKey), 5222); + mService = mSettings.getString(getString(R.string.PreferenceService), ""); // TODO penser a commenter // mHost = "10.0.2.2"; @@ -139,7 +141,7 @@ 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, mPort, mProxyInfo); + mConnectionConfiguration = new ConnectionConfiguration(mHost, mPort, mService, mProxyInfo); } else { mConnectionConfiguration = new ConnectionConfiguration(mHost, mPort); } diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/service/BeemChatManager.java --- a/src/com/beem/project/beem/service/BeemChatManager.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/service/BeemChatManager.java Fri Apr 24 21:41:32 2009 +0200 @@ -23,6 +23,7 @@ import android.util.Log; import com.beem.project.beem.BeemService; +import com.beem.project.beem.R; import com.beem.project.beem.service.aidl.IChat; import com.beem.project.beem.service.aidl.IChatManager; import com.beem.project.beem.service.aidl.IChatManagerListener; @@ -140,7 +141,7 @@ public void chatCreated(Chat chat, boolean locally) { IChat newchat = getChat(chat); if (!locally) { - // chat.addMessageListener(mChatListener); + // chat.addMessageListener(mChatListener); notifyNewChat(newchat); } chat.addMessageListener(mChatListener); @@ -162,15 +163,15 @@ private void notifyNewChat(IChat chat) { try { String text = chat.getParticipant().getJID(); - Notification notif = new Notification(com.beem.project.beem.R.drawable.signal, text, System + Notification notif = new Notification(com.beem.project.beem.R.drawable.notify_message, text, System .currentTimeMillis()); notif.defaults = Notification.DEFAULT_ALL; notif.flags = Notification.FLAG_AUTO_CANCEL; Intent intent = new Intent(mService, SendIM.class); // TODO use prefix for name intent.putExtra("contact", chat.getParticipant()); - notif.setLatestEventInfo(mService, text, "nouveau message", PendingIntent.getActivity(mService, 0, - intent, PendingIntent.FLAG_ONE_SHOT)); + notif.setLatestEventInfo(mService, text, mService.getString(R.string.BeemChatManagerNewMessage), + PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_ONE_SHOT)); int id = chat.hashCode(); mService.sendNotification(id, notif); } catch (RemoteException e) { diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/service/Contact.java --- a/src/com/beem/project/beem/service/Contact.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/service/Contact.java Fri Apr 24 21:41:32 2009 +0200 @@ -142,6 +142,7 @@ public void setStatus(Presence presence) { Log.i(TAG,"PRESENCE"); mStatus = Status.getStatusFromPresence(presence); + mMsgState = presence.getStatus(); } /** diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/service/RosterAdapter.java --- a/src/com/beem/project/beem/service/RosterAdapter.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/service/RosterAdapter.java Fri Apr 24 21:41:32 2009 +0200 @@ -220,6 +220,7 @@ } c.addRes(StringUtils.parseResource(presence.getFrom())); c.setStatus(mAdaptee.getPresence(presence.getFrom())); + c.setMsgState(presence.getStatus()); /* redispatch vers les IBeemRosterListener */ final int n = mRemoteRosListeners.beginBroadcast(); diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/service/XmppConnectionAdapter.java --- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Fri Apr 24 21:41:32 2009 +0200 @@ -88,7 +88,10 @@ return true; } catch (XMPPException e) { Log.e(TAG, "Error while connecting", e); - mConListener.connectionFailed(e.getXMPPError().getMessage()); // + if (e.getXMPPError() != null) + mConListener.connectionFailed(e.getXMPPError().getMessage()); // + else + mConListener.connectionFailed("Error On Connection"); } return false; } diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/service/XmppFacade.java --- a/src/com/beem/project/beem/service/XmppFacade.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/service/XmppFacade.java Fri Apr 24 21:41:32 2009 +0200 @@ -97,7 +97,7 @@ Notification mStatusNotification; String text = (msg == null ? "" : msg); - mStatusNotification = new Notification(com.beem.project.beem.R.drawable.signal, text, System.currentTimeMillis()); + mStatusNotification = new Notification(com.beem.project.beem.R.drawable.notify_signal, text, System.currentTimeMillis()); mStatusNotification.defaults = Notification.DEFAULT_ALL; mStatusNotification.flags = Notification.FLAG_NO_CLEAR; diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/ui/ChangeStatus.java --- a/src/com/beem/project/beem/ui/ChangeStatus.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/ChangeStatus.java Fri Apr 24 21:41:32 2009 +0200 @@ -1,16 +1,14 @@ package com.beem.project.beem.ui; import android.app.Activity; - +import android.content.Context; import android.content.Intent; - -import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; - import android.os.Bundle; import android.os.Handler; import android.os.RemoteException; +import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.ArrayAdapter; @@ -22,7 +20,6 @@ import com.beem.project.beem.BeemApplication; import com.beem.project.beem.BeemService; import com.beem.project.beem.R; - import com.beem.project.beem.service.aidl.IXmppFacade; import com.beem.project.beem.utils.Status; @@ -44,18 +41,20 @@ private static final int UNAVAILABLE_IDX = 4; private SharedPreferences mSettings; private ArrayAdapter mAdapter; - private Context mContext = this; private Toast mToast; + private static Integer nb = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.changestatus); - + + nb++; + Log.i("nb de oncreate changestatus", nb.toString()); // Beem Application specific mHandler = new Handler(); mBeemApplication = BeemApplication.getApplication(this); - + + setContentView(R.layout.changestatus); mStatusText = (TextView) findViewById(R.id.ChangeStatusText); mOk = (Button) findViewById(R.id.ChangeStatusOk); mClear = (Button) findViewById(R.id.ChangeStatusClear); @@ -67,7 +66,7 @@ mAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, STATUS); mAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); mSpinner.setAdapter(mAdapter); - mToast = Toast.makeText(mContext, R.string.ChangeStatusOk, Toast.LENGTH_LONG); + mToast = Toast.makeText(this, R.string.ChangeStatusOk, Toast.LENGTH_LONG); showSettings(); } diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/ui/ContactList.java --- a/src/com/beem/project/beem/ui/ContactList.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactList.java Fri Apr 24 21:41:32 2009 +0200 @@ -42,8 +42,10 @@ private static final String CHILD = "CHILD"; private static final String GROUP = "GROUP"; private IXmppFacade mService = null; + private ExpandableListAdapter mAdapter; private BeemApplication mBeemApplication; private BeemRosterListener mRosterListener; + private SharedPreferences mSettings; private IRoster mRoster; @SuppressWarnings("unchecked") @@ -60,9 +62,19 @@ @Override protected void onCreate(Bundle saveBundle) { super.onCreate(saveBundle); + mRosterListener = new BeemRosterListener(); + mSettings = getSharedPreferences(getString(R.string.PreferenceFileName), MODE_PRIVATE); mBeemApplication = BeemApplication.getApplication(this); - mRosterListener = new BeemRosterListener(); - mBeemApplication.startBeemService(); + } + + @Override + protected void onResume() { + super.onResume(); + + if (!mBeemApplication.isConnected()) { + mBeemApplication = BeemApplication.getApplication(this); + mBeemApplication.startBeemService(); + } mBeemApplication.callWhenConnectedToServer(new Handler(), new Runnable() { @Override public void run() { @@ -79,17 +91,10 @@ e.printStackTrace(); } } - callbackShowContactList(); + if (mAdapter == null) + callbackShowContactList(); } }); - - // bug fixe temporaire des betises de marseille - - SharedPreferences mSettings = getSharedPreferences(getString(R.string.PreferenceFileName), MODE_PRIVATE); - SharedPreferences.Editor editor = mSettings.edit(); - editor.putInt(getString(R.string.PreferencePortKey), 5222); - editor.commit(); - } @Override @@ -153,25 +158,18 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == PREFERENCECHANGED) { if (resultCode == RESULT_OK) { + mAdapter = null; + setListAdapter(mAdapter); mBeemApplication.stopBeemService(); - mBeemApplication.startBeemService(); } } } - private boolean isStatusOK(int status) { - if (status == Status.CONTACT_STATUS_AVAILABLE || status == Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT - || status == Status.CONTACT_STATUS_AWAY || status == Status.CONTACT_STATUS_BUSY) - return true; - return false; - } - private void showContactList(List listGroup, List listContact) { - ExpandableListAdapter Adapter; List> groupData = new ArrayList>(); List>> childData = new ArrayList>>(); - - if (listGroup.size() == 0) + int groupSize = listGroup.size(); + if (groupSize == 0) listGroup.add("Default"); for (int i = 0; i < listGroup.size(); i++) { Map curGroupMap = new HashMap(); @@ -182,18 +180,20 @@ List> children = new ArrayList>(); for (int j = 0; j < listContact.size(); ++j) { Contact c = listContact.get(j); - Log.i(TAG, c.getID() + " " + c.getJID()); - Map curChildMap = new HashMap(); - children.add(curChildMap); - curChildMap.put(CHILD, c); + if (groupSize == 0 || c.getGroups().contains(listGroup.get(i)) ) { + Log.i(TAG, c.getID() + " " + c.getJID()); + Map curChildMap = new HashMap(); + children.add(curChildMap); + curChildMap.put(CHILD, c); + } } childData.add(children); } - Adapter = new ContactExpandableListAdapter(this, groupData, R.layout.contactlistgroup, new String[] { GROUP }, + mAdapter = new ContactExpandableListAdapter(this, groupData, R.layout.contactlistgroup, new String[] { GROUP }, new int[] { R.id.textgroup }, childData, R.layout.contactlistcontact, new String[] { CHILD }, new int[] { R.id.contactliststatus, R.id.contactlistpseudo, R.id.contactlistmsgperso, R.id.contactlistavatar }); - setListAdapter(Adapter); + setListAdapter(mAdapter); } /** @@ -314,4 +314,4 @@ } } -} \ No newline at end of file +} diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/ui/ContactListSettings.java --- a/src/com/beem/project/beem/ui/ContactListSettings.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactListSettings.java Fri Apr 24 21:41:32 2009 +0200 @@ -1,8 +1,12 @@ package com.beem.project.beem.ui; import android.app.Activity; +import android.content.Context; +import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; +import android.text.Layout; +import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.AdapterView; @@ -11,7 +15,9 @@ import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Spinner; +import android.widget.TextView; import android.widget.AdapterView.OnItemSelectedListener; +import android.widget.LinearLayout.LayoutParams; import com.beem.project.beem.R; @@ -48,17 +54,6 @@ showSettings(); Button ok = (Button) findViewById(R.id.ok); ok.setOnClickListener(mOkListener); - - Button reco = (Button) findViewById(R.id.reconnect); - reco.setOnClickListener(new OnClickListener () { - - @Override - public void onClick(View v) { - setResult(RESULT_OK); - finish(); - } - - }); } private OnItemSelectedListener mProxyType = new OnItemSelectedListener() { @@ -68,12 +63,16 @@ String value = parent.getSelectedItem().toString(); LinearLayout ll = (LinearLayout) findViewById(R.id.proxy_layout); SharedPreferences.Editor editor = mSettings.edit(); - + LayoutParams lp = (LayoutParams) ll.getLayoutParams(); if (value.equals(getString(R.string.PreferenceProxyTypeNone))) { - ll.setVisibility(LinearLayout.INVISIBLE); + ll.setVisibility(LinearLayout.INVISIBLE); + lp.height = 0; + ll.setLayoutParams(lp); editor.putBoolean(getString(R.string.PreferenceUseProxy), false); } else { ll.setVisibility(LinearLayout.VISIBLE); + lp.height = LayoutParams.WRAP_CONTENT; + ll.setLayoutParams(lp); editor.putBoolean(getString(R.string.PreferenceUseProxy), true); } if (!value.equals(getPreferenceString(R.string.PreferenceProxyType))) { @@ -92,7 +91,7 @@ private OnClickListener mOkListener = new OnClickListener() { public void onClick(View v) { SharedPreferences.Editor editor = mSettings.edit(); - + if (isChanged(R.id.host, R.string.PreferenceHostKey)) { editor.putString(getString(R.string.PreferenceHostKey), getWidgetText(R.id.host)); mIsChanged = true; @@ -109,13 +108,19 @@ editor.putString(getString(R.string.PreferencePasswordKey), getWidgetText(R.id.password)); mIsChanged = true; } + if (isChanged(R.id.service, R.string.PreferenceService)) { + editor.putString(getString(R.string.PreferenceService), getWidgetText(R.id.service)); + mIsChanged = true; + } if (isChanged(R.id.proxy_host, R.string.PreferenceProxyHost)) { editor.putString(getString(R.string.PreferenceProxyHost), getWidgetText(R.id.proxy_host)); mIsChanged = true; } - 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))); + if (Integer.parseInt(getWidgetText(R.id.proxy_port)) != mSettings.getInt( + getString(R.string.PreferenceProxyPort), 0)) { + editor + .putInt(getString(R.string.PreferenceProxyPort), Integer.parseInt(getWidgetText(R.id.proxy_port))); mIsChanged = true; } if (isChanged(R.id.proxy_login, R.string.PreferenceProxyUser)) { @@ -149,6 +154,8 @@ e.setText(getPreferenceString(R.string.PreferenceLoginKey)); e = (EditText) findViewById(R.id.password); e.setText(getPreferenceString(R.string.PreferencePasswordKey)); + e = (EditText) findViewById(R.id.service); + e.setText(getPreferenceString(R.string.PreferenceService)); e = (EditText) findViewById(R.id.proxy_host); e.setText(getPreferenceString(R.string.PreferenceProxyHost)); diff -r ec2072a6089a -r e9d73490be9b src/com/beem/project/beem/ui/SendIM.java --- a/src/com/beem/project/beem/ui/SendIM.java Fri Apr 24 21:20:06 2009 +0200 +++ b/src/com/beem/project/beem/ui/SendIM.java Fri Apr 24 21:41:32 2009 +0200 @@ -109,7 +109,9 @@ @Override protected void onResume() { super.onResume(); - mBeemApplication.startBeemService(); + mBeemApplication = BeemApplication.getApplication(this); + if (!mBeemApplication.isConnected()) + mBeemApplication.startBeemService(); mBeemApplication.callWhenConnectedToServer(mHandler, new Runnable() { @Override @@ -206,9 +208,8 @@ } /** - * Callback for menu creation. <<<<<<< local - * @param menu the menu created ======= - * @param menu The created menu >>>>>>> other + * Callback for menu creation. + * @param The created menu * @return true on success, false otherwise */ @Override