# HG changeset patch # User nikita@nikita-rack # Date 1239296603 -7200 # Node ID 58622a0f9485800d29309dac76c0a0847993c0e7 # Parent e0eabd2266fea1a81aaea7053ef63524d12708bf petites majs sur le TimeOut diff -r e0eabd2266fe -r 58622a0f9485 src/com/beem/project/beem/BeemApplication.java --- a/src/com/beem/project/beem/BeemApplication.java Thu Apr 09 17:58:19 2009 +0200 +++ b/src/com/beem/project/beem/BeemApplication.java Thu Apr 09 19:03:23 2009 +0200 @@ -167,7 +167,7 @@ @Override public void run() { - mBeemApp.mProgressDialog.setMessage("Connection failed"); + mBeemApp.mProgressDialog.setMessage(mErrorMsg); } /** @@ -264,9 +264,9 @@ } @Override - public void connectionFailed() throws RemoteException { + public void connectionFailed(String errorMsg) throws RemoteException { Log.i(TAG, "Connection Failed"); - ConnectionRunnable cRun = new ConnectionRunnable("Connection failed"); + ConnectionRunnable cRun = new ConnectionRunnable(errorMsg); mBeemApp.mActivity.runOnUiThread(cRun); } diff -r e0eabd2266fe -r 58622a0f9485 src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Thu Apr 09 17:58:19 2009 +0200 +++ b/src/com/beem/project/beem/BeemService.java Thu Apr 09 19:03:23 2009 +0200 @@ -220,9 +220,11 @@ } + @Override - public void connectionFailed() throws RemoteException { - Log.d("TEST", "Connection Failed"); + public void connectionFailed(String errorMsg) throws RemoteException { + // TODO Auto-generated method stub + } }); } catch (RemoteException e) { diff -r e0eabd2266fe -r 58622a0f9485 src/com/beem/project/beem/service/XmppConnectionAdapter.java --- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Thu Apr 09 17:58:19 2009 +0200 +++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Thu Apr 09 19:03:23 2009 +0200 @@ -87,8 +87,7 @@ return true; } catch (XMPPException e) { Log.e(TAG, "Error while connecting", e); - mConListener.connectionFailed(); - mLastException = new BeemException(e); + mConListener.connectionFailed(e.getXMPPError().getMessage()); // } return false; } @@ -314,14 +313,14 @@ mRemoteConnListeners.finishBroadcast(); } - public void connectionFailed() { + public void connectionFailed(String errorMsg) { Log.i(TAG, "Connection Failed"); final int n = mRemoteConnListeners.beginBroadcast(); for (int i = 0; i < n; i++) { IBeemConnectionListener listener = mRemoteConnListeners.getBroadcastItem(i); try { - listener.connectionFailed(); + listener.connectionFailed(errorMsg); } catch (RemoteException e) { // The RemoteCallbackList will take care of removing the // dead listeners. diff -r e0eabd2266fe -r 58622a0f9485 src/com/beem/project/beem/service/aidl/IBeemConnectionListener.aidl --- a/src/com/beem/project/beem/service/aidl/IBeemConnectionListener.aidl Thu Apr 09 17:58:19 2009 +0200 +++ b/src/com/beem/project/beem/service/aidl/IBeemConnectionListener.aidl Thu Apr 09 19:03:23 2009 +0200 @@ -40,5 +40,5 @@ /** * Callback to call when the connection Failed */ - void connectionFailed(); + void connectionFailed(in String errorMsg); }