Check for account before launching welcome screen.
If this is running via monkey, might not have an account yet. fixes b/5518958 java.lang.NullPointerException at com.android.email.activity.MessageCompose.onBack(MessageCompose.java:1797) Change-Id: I17fb606a2fd3aad685a855ae8bd9eda551296ca3
This commit is contained in:
parent
87dde96eaf
commit
fe402a8081
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user