Merge change I9a3d501a into eclair-mr2

* changes:
  Run MailboxAlarmReceiver's code in a background thread
This commit is contained in:
Android (Google) Code Review 2009-12-11 13:06:44 -08:00
commit 4848aa2a1f

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;