am d9bd288d: am 3c3fc38d: am f5fcae4e: am 52fcfb47: Merge "Bail out of loader callbacks if activity is destroyed" into ub-gmail-ur14-dev

* commit 'd9bd288d9ec64da4251c0a706f33273496ae21d0':
  Bail out of loader callbacks if activity is destroyed
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index 05cd435..390afc8 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -3316,6 +3316,9 @@
             LogUtils.d(LOG_TAG,
                     "IN AAC.ConversationCursor.onLoadFinished, data=%s loader=%s this=%s",
                     data, loader, this);
+            if (isDestroyed()) {
+                return;
+            }
             if (isDrawerEnabled() && mDrawerListener.getDrawerState() != DrawerLayout.STATE_IDLE) {
                 LogUtils.d(LOG_TAG, "ConversationListLoaderCallbacks.onLoadFinished: ignoring.");
                 mConversationListLoadFinishedIgnored = true;
@@ -3425,6 +3428,9 @@
             if (data == null) {
                 LogUtils.e(LOG_TAG, "Received null cursor from loader id: %d", loader.getId());
             }
+            if (isDestroyed()) {
+                return;
+            }
             switch (loader.getId()) {
                 case LOADER_FOLDER_CURSOR:
                     if (data != null && data.moveToFirst()) {
@@ -3558,6 +3564,9 @@
             if (data == null) {
                 LogUtils.e(LOG_TAG, "Received null cursor from loader id: %d", loader.getId());
             }
+            if (isDestroyed()) {
+                return;
+            }
             switch (loader.getId()) {
                 case LOADER_ACCOUNT_CURSOR:
                     // We have received an update on the list of accounts.