String action = intent.getAction();
ContentResolver cr = context.getContentResolver();
CalendarProvider provider;
IContentProvider icp = cr.acquireProvider("calendar");
provider = (CalendarProvider) ContentProvider.
coerceToLocalContentProvider(icp);
if (action.equals(SCHEDULE)) {
provider.scheduleNextAlarm(false /* do not remove alarms */);
} else if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
provider.bootCompleted();
}
cr.releaseProvider(icp);