FileDocCategorySizeDatePackage
AlarmInitReceiver.javaAPI DocAndroid 1.5 API1503Wed May 06 22:42:42 BST 2009com.android.alarmclock

AlarmInitReceiver

public class AlarmInitReceiver extends android.content.BroadcastReceiver

Fields Summary
Constructors Summary
Methods Summary
public voidonReceive(android.content.Context context, android.content.Intent intent)
Sets alarm on ACTION_BOOT_COMPLETED. Resets alarm on TIME_SET, TIMEZONE_CHANGED

        String action = intent.getAction();
        if (Log.LOGV) Log.v("AlarmInitReceiver" + action);

        if (context.getContentResolver() == null) {
            Log.e("AlarmInitReceiver: FAILURE unable to get content resolver.  Alarms inactive.");
            return;
        }
        if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
            Alarms.disableSnoozeAlert(context);
            Alarms.disableExpiredAlarms(context);
        }
        Alarms.setNextAlert(context);