am ac96f640: Merge "Check for account before launching welcome screen."

* commit 'ac96f64081ac5d90815be2529dfedba28a90e4b4':
  Check for account before launching welcome screen.
This commit is contained in:
Mindy Pereira 2011-11-28 11:37:39 -08:00 committed by Android Git Automerger
commit ec865cad01

View File

@ -1778,7 +1778,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
return;
}
if (isOpenedFromWidget() || !systemKey) {
if ((isOpenedFromWidget() || !systemKey) && (mAccount != null)) {
// Otherwise, need to open the main screen for the appropriate account.
// Note that mAccount should always be set by the time the action bar is set up.
startActivity(Welcome.createOpenAccountInboxIntent(this, mAccount.mId));