am 01b14b54: am 3cc9bd30: am db1ca5f7: Don\'t modify the ping on the main thread.

* commit '01b14b54e435373ad9cea9e366215750301f2be4':
  Don't modify the ping on the main thread.
diff --git a/src/com/android/exchange/service/EmailSyncAdapterService.java b/src/com/android/exchange/service/EmailSyncAdapterService.java
index 8284982..43bb0cf 100644
--- a/src/com/android/exchange/service/EmailSyncAdapterService.java
+++ b/src/com/android/exchange/service/EmailSyncAdapterService.java
@@ -83,7 +83,7 @@
     private static final String TAG = Eas.LOG_TAG;
 
     private static final String EXTRA_START_PING = "START_PING";
-    private static final String EXTRA_ACCOUNT_ID = "ACCOUNT_ID";
+    private static final String EXTRA_PING_ACCOUNT = "PING_ACCOUNT";
     private static final long SYNC_ERROR_BACKOFF_MILLIS = 5 * DateUtils.MINUTE_IN_MILLIS;
 
     /**
@@ -259,7 +259,7 @@
                         final Intent intent = new Intent(service, EmailSyncAdapterService.class);
                         intent.setAction(Eas.EXCHANGE_SERVICE_INTENT_ACTION);
                         intent.putExtra(EXTRA_START_PING, true);
-                        intent.putExtra(EXTRA_ACCOUNT_ID, account.mId);
+                        intent.putExtra(EXTRA_PING_ACCOUNT, amAccount);
                         final PendingIntent pi = PendingIntent.getService(
                                 EmailSyncAdapterService.this, 0, intent,
                                 PendingIntent.FLAG_ONE_SHOT);
@@ -610,11 +610,9 @@
                 LogUtils.d(TAG, "Restarting ping from alarm");
                 // We've been woken up by an alarm to restart our ping. This happens if a sync
                 // fails, rather that instantly starting the ping, we'll hold off for a few minutes.
-                final long accountId = intent.getLongExtra(EXTRA_ACCOUNT_ID, -1);
-                if (accountId != -1) {
-                    final Account account = Account.restoreAccountWithId(this, accountId);
-                    mSyncHandlerMap.modifyPing(false, account);
-                }
+                final android.accounts.Account account =
+                        intent.getParcelableExtra(EXTRA_PING_ACCOUNT);
+                EasPing.requestPing(account);
             }
         }
         return super.onStartCommand(intent, flags, startId);