Fix bug #231
authorDa Risk <darisk972@gmail.com>
Sat, 09 Jan 2010 16:55:36 +0100
changeset 629 d92cd8659e1f
parent 628 c141eac87368
child 630 dbc66edfd61f
Fix bug #231 The method setIntent is always followed by a onResume()
src/com/beem/project/beem/ui/Chat.java
--- a/src/com/beem/project/beem/ui/Chat.java	Fri Jan 08 20:06:25 2010 +0100
+++ b/src/com/beem/project/beem/ui/Chat.java	Sat Jan 09 16:55:36 2010 +0100
@@ -169,8 +169,8 @@
     }
 
     @Override
-    protected void onStart() {
-	super.onStart();
+    protected void onResume() {
+	super.onResume();
 	if (mXmppFacade == null)
 	    bindService(SERVICE_INTENT, mConn, BIND_AUTO_CREATE);
     }
@@ -188,9 +188,8 @@
      * {@inheritDoc}.
      */
     @Override
-    protected void onStop() {
-	super.onStop();
-
+    protected void onPause() {
+	super.onPause();
 	try {
 	    if (mChat != null) {
 		mChat.setOpen(false);
@@ -212,22 +211,9 @@
      * {@inheritDoc}.
      */
     @Override
-    protected void onPause() {
-	super.onPause();
-    }
-
-    /**
-     * {@inheritDoc}.
-     */
-    @Override
     protected void onNewIntent(Intent intent) {
 	super.onNewIntent(intent);
-	try {
-	    mContact = new Contact(intent.getData());
-	    changeCurrentChat(mContact);
-	} catch (RemoteException e) {
-	    Log.e(TAG, e.getMessage());
-	}
+	setIntent(intent);
     }
 
     /**