Lines Matching refs:to

10  * Unless required by applicable law or agreed to in writing, software
57 * This class handles all the state changes for alarm instances. You need to
58 * register all alarm instances with the state manager if you want them to
60 * then you must also re-register instances to fix their states.
68 * This state is used when the alarm is activated, but doesn't need to display anything. It
69 * is in charge of changing the alarm instance state to a LOW_NOTIFICATION_STATE.
72 * This state is used to notify the user that the alarm will go off
74 * state handles the state changes to HIGH_NOTIFICATION_STATE, HIDE_NOTIFICATION_STATE and
78 * This is a transient state of the LOW_NOTIFICATION_STATE, where the user wants to hide the
82 * This state behaves like the LOW_NOTIFICATION_STATE, but doesn't allow the user to hide it.
87 * also increments the alarm time in the instance to reflect the new snooze time.
92 * doesn't then it might be change to MISSED_STATE if auto-silenced was enabled.
96 * it. At this point the alarm instance is dead and we check the parent alarm to see if we need
97 * to disable or schedule a new alarm_instance. There is also a notification shown to the user
103 * whenever you want to get rid of the alarm instance. This state will also check the alarm
104 * parent to see if it should disable or schedule a new alarm instance.
107 // Intent action to trigger an instance state change.
110 // Intent action to show the alarm and dismiss the instance
113 // Intent action for an AlarmManager alarm serving only to set the next alarm indicators
116 // System intent action to notify AppWidget that we changed the alarm text.
119 // Extra key to set the desired state change.
122 // Extra key to indicate the state change was launched from a notification.
125 // Extra key to set the global broadcast id.
128 // Intent category tags used to dismiss, snooze or delete an alarm
136 // Buffer time in seconds to fire alarm instead of marking it missed.
178 * Returns an alarm instance of an alarm that's going to fire next.
181 * @return an alarm instance that will fire earliest relative to current time.
210 // Write directly to NEXT_ALARM_FORMATTED in all pre-L versions
213 LogUtils.i("Updated next alarm time to: \'" + time + '\'');
219 LogUtils.e("Unable to update next alarm to: \'" + time + '\'', se);
229 // alarm that is going to fire next. The operation is constructed such that it is ignored
242 // Create an intent that can be used to show or edit details of the next alarm.
256 * Used by dismissed and missed states, to update parent alarm. This will either
260 * @param instance to update parent for
297 * Utility method to create a proper change state intent.
300 * @param tag used to make intent differ from other state change intents.
301 * @param instance to change state to
302 * @param state to change to.
303 * @return intent that can be used to change an alarm instance state
307 // This intent is directed to AlarmService, though the actual handling of it occurs here
310 // Out Of Memory killer. If clock is killed during that jump, firing an alarm can fail to
311 // occur. To be safer, the call begins in AlarmService, which has the power to display the
327 * @param time to trigger state change
328 * @param instance to change state to
329 * @param newState to change to
340 * @param instance to disable all {@link AlarmManager} timers
348 * This will set the alarm instance to the SILENT_STATE and update
350 * to occur in the future.
353 * @param instance to set state to
356 LogUtils.i("Setting silent state to instance " + instance.mId);
370 * This will set the alarm instance to the LOW_NOTIFICATION_STATE and update
372 * to occur in the future.
375 * @param instance to set state to
378 LogUtils.i("Setting low notification state to instance " + instance.mId);
392 * This will set the alarm instance to the HIDE_NOTIFICATION_STATE and update
394 * to occur in the future.
397 * @param instance to set state to
400 LogUtils.i("Setting hide notification state to instance " + instance.mId);
414 * This will set the alarm instance to the HIGH_NOTIFICATION_STATE and update
416 * to occur in the future.
419 * @param instance to set state to
422 LogUtils.i("Setting high notification state to instance " + instance.mId);
436 * This will set the alarm instance to the FIRED_STATE and update
438 * to occur in the future.
441 * @param instance to set state to
444 LogUtils.i("Setting fire state to instance " + instance.mId);
452 // if the time changed *backward* and pushed an instance from missed back to fired,
470 * This will set the alarm instance to the SNOOZE_STATE and update
472 * to occur in the future.
475 * @param instance to set state to
488 LogUtils.i("Setting snoozed state to instance " + instance.mId + " for "
519 * This will set the alarm instance to the MISSED_STATE and update
521 * to occur in the future.
524 * @param instance to set state to
527 LogUtils.i("Setting missed state to instance " + instance.mId);
531 // Check parent if it needs to reschedule, disable or delete itself
551 * This will set the alarm instance to the PREDISMISSED_STATE and schedule an instance state
552 * change to DISMISSED_STATE at the regularly scheduled firing time.
555 * @param instance to set state to
558 LogUtils.i("Setting predismissed state to instance " + instance.mId);
570 // Check parent if it needs to reschedule, disable or delete itself
579 * This just sets the alarm instance to DISMISSED_STATE.
582 LogUtils.i("Setting dismissed state to instance " + instance.mId);
590 * any state changes that need to occur in the future.
593 * @param instance to set state to
598 // Remove all other timers and notifications associated to it
601 // Check parent if it needs to reschedule, disable or delete itself
614 * This will set the instance state to DISMISSED_STATE and remove its notifications and
618 * @param instance to unregister
630 * This registers the AlarmInstance to the state manager. This will look at the instance
631 * and choose the most appropriate state to put it in. This is primarily used by new
635 * have to correct the alarm instance state. This means we have to handle special cases as
651 * @param instance to register
712 // we need to add a check to see if we should fire the alarm instead of marking it
723 // We only want to display snooze notification and not update the time,
742 // The caller prefers to handle updateNextAlarm for optimization
753 * @param alarmId to find instances to delete.
822 LogUtils.i("A time change has caused an existing alarm scheduled to fire at %s to" +
823 " be replaced by a new alarm scheduled to fire at %s", oldTime, newTime);
837 * Utility method to set alarm instance state via constants.
840 * @param instance to change state on
841 * @param state to change to
845 LogUtils.e("Null alarm instance while setting state to %d", state);
877 LogUtils.e("Trying to change to unknown alarm state: " + state);
918 // Allows dismiss/snooze requests to go through
967 * Creates an intent that can be used to set an AlarmManager alarm to set the next alarm
976 * given the default is to return {@link Calendar#getInstance()}. Otherwise, the factory
1003 LogUtils.i("Scheduling state change %d to instance %d at %s (%d)", newState,