2008-11-01 17:32:06 -04:00
|
|
|
|
2008-12-16 18:34:01 -05:00
|
|
|
package com.android.email.service;
|
2008-11-01 17:32:06 -04:00
|
|
|
|
2008-12-16 18:34:01 -05:00
|
|
|
import com.android.email.MessagingController;
|
2008-11-01 17:32:06 -04:00
|
|
|
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
|
|
|
|
|
|
|
public class BootReceiver extends BroadcastReceiver {
|
|
|
|
public void onReceive(Context context, Intent intent) {
|
|
|
|
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
|
|
|
MailService.actionReschedule(context);
|
|
|
|
}
|
|
|
|
else if (Intent.ACTION_DEVICE_STORAGE_LOW.equals(intent.getAction())) {
|
|
|
|
MailService.actionCancel(context);
|
|
|
|
}
|
|
|
|
else if (Intent.ACTION_DEVICE_STORAGE_OK.equals(intent.getAction())) {
|
|
|
|
MailService.actionReschedule(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|