# HG changeset patch # User Vincent Veronis # Date 1313965332 -7200 # Node ID 6545a0ce9b3a980b72dbd08a08933e905cf69019 # Parent 6e537de6b1901378458c510bcf274e431a4fdb37 Show error message if Login fail diff -r 6e537de6b190 -r 6545a0ce9b3a src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Sun Aug 21 23:48:54 2011 +0200 +++ b/src/com/beem/project/beem/BeemService.java Mon Aug 22 00:22:12 2011 +0200 @@ -507,6 +507,7 @@ private void handleConnect(Bundle b) { Intent res = new Intent(BeemIntent.ACTION_DISCONNECTED); + res.putExtra(BeemIntent.EXTRA_MESSAGE, R.string.contact_status_msg_offline); String account = null; if (b != null) { @@ -541,8 +542,10 @@ Log.e(TAG, "Account configuration : " + account.toString() + " DONE"); } else { Log.w(TAG, "Unable to connect " + account); + res.putExtra(BeemIntent.EXTRA_MESSAGE, beemcoAdapter.getErrorMessage()); } } catch (RemoteException e) { + res.putExtra(BeemIntent.EXTRA_MESSAGE, beemcoAdapter.getErrorMessage()); Log.e(TAG, "Unable to connect " + account, e); } diff -r 6e537de6b190 -r 6545a0ce9b3a src/com/beem/project/beem/ui/Login.java --- a/src/com/beem/project/beem/ui/Login.java Sun Aug 21 23:48:54 2011 +0200 +++ b/src/com/beem/project/beem/ui/Login.java Mon Aug 22 00:22:12 2011 +0200 @@ -298,8 +298,9 @@ logo.clearAnimation(); } } else if (BeemIntent.ACTION_DISCONNECTED.equals(action)) { + String message = intent.getExtras().getString(BeemIntent.EXTRA_MESSAGE); if (text != null) - text.setText(R.string.contact_status_msg_offline); + text.setText(message); if (logo != null) { logo.setImageResource(R.drawable.beem_launcher_icon_silver); logo.clearAnimation();