am d4ecce95: am 4848aa2a: Merge change I9a3d501a into eclair-mr2

Merge commit 'd4ecce95f513e3567f5c1be550d86d6a90e7ca63'

* commit 'd4ecce95f513e3567f5c1be550d86d6a90e7ca63':
  Run MailboxAlarmReceiver's code in a background thread
This commit is contained in:
Marc Blank 2009-12-11 13:13:26 -08:00 committed by Android Git Automerger
commit 6cadbc1632

View File

@ -50,8 +50,16 @@ public class EmailSyncAlarmReceiver extends BroadcastReceiver {
private static String TAG = "EmailSyncAlarm";
@Override
public void onReceive(Context context, Intent intent) {
public void onReceive(final Context context, Intent intent) {
Log.v(TAG, "onReceive");
new Thread(new Runnable() {
public void run() {
handleReceive(context);
}
}).start();
}
private void handleReceive(Context context) {
ArrayList<Long> mailboxesToNotify = new ArrayList<Long>();
ContentResolver cr = context.getContentResolver();
int messageCount = 0;