Prevent spurious Waiting from being shown

Now the account can represent the state that it hasn't been initialized
when it can't give a definitive answer about whether a sync is required.

The Compose Activity and Widget selection activity still will show
the wait activity if the account is not fully initialized

But the Abstract activity controller will only show the wait fragment
when the account object has been initialized enough to give a definitive
answer about whether sync is needed

Bug: 7090741
Change-Id: I5e68f074418983b759f0e8a96fb08b65e81406e8
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index 4e8d032..6e9cd9b 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -16,7 +16,6 @@
 
 package com.android.mail.compose;
 
-import android.animation.LayoutTransition;
 import android.app.ActionBar;
 import android.app.ActionBar.OnNavigationListener;
 import android.app.Activity;
@@ -24,7 +23,6 @@
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.app.Fragment;
-import android.app.FragmentManager;
 import android.app.FragmentTransaction;
 import android.app.LoaderManager;
 import android.content.ContentResolver;
@@ -76,7 +74,6 @@
 import com.android.mail.providers.Account;
 import com.android.mail.providers.Address;
 import com.android.mail.providers.Attachment;
-import com.android.mail.providers.Folder;
 import com.android.mail.providers.MailAppProvider;
 import com.android.mail.providers.Message;
 import com.android.mail.providers.MessageModification;
@@ -97,8 +94,6 @@
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
-import org.json.JSONException;
-
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.util.ArrayList;
@@ -409,7 +404,7 @@
             // If none of the accounts are syncing, setup a watcher.
             boolean anySyncing = false;
             for (Account a : mAccounts) {
-                if (a.isAccountIntialized()) {
+                if (a.isAccountReady()) {
                     anySyncing = true;
                     break;
                 }
@@ -2851,7 +2846,7 @@
                     ArrayList<Account> initializedAccounts = new ArrayList<Account>();
                     do {
                         account = new Account(data);
-                        if (account.isAccountIntialized()) {
+                        if (account.isAccountReady()) {
                             initializedAccounts.add(account);
                         }
                         accounts.add(account);