diff --git a/api/current.txt b/api/current.txt index 19a9057739cc8..609ff06ac96b4 100644 --- a/api/current.txt +++ b/api/current.txt @@ -19393,7 +19393,6 @@ package android.provider { field public static final java.lang.String ACTION_SET_ALARM = "android.intent.action.SET_ALARM"; field public static final java.lang.String ACTION_SET_TIMER = "android.intent.action.SET_TIMER"; field public static final java.lang.String EXTRA_DAYS = "android.intent.extra.alarm.DAYS"; - field public static final java.lang.String EXTRA_DELETE_AFTER_USE = "android.intent.extra.alarm.DELETE_AFTER_USE"; field public static final java.lang.String EXTRA_HOUR = "android.intent.extra.alarm.HOUR"; field public static final java.lang.String EXTRA_LENGTH = "android.intent.extra.alarm.LENGTH"; field public static final java.lang.String EXTRA_MESSAGE = "android.intent.extra.alarm.MESSAGE"; diff --git a/core/java/android/provider/AlarmClock.java b/core/java/android/provider/AlarmClock.java index f3267ee233b35..5e56e934b8052 100644 --- a/core/java/android/provider/AlarmClock.java +++ b/core/java/android/provider/AlarmClock.java @@ -36,10 +36,15 @@ public final class AlarmClock { *
* Activates an existing alarm or creates a new one. *
- * This action requests an alarm to be set for a given time of day. If an alarm already - * exists for this time, an implementation may use it rather than create a new one. If no time - * of day is specified, the implementation should start an activity that is capable of setting - * an alarm (SKIP_UI is ignored in this case). This action always enables the alarm. + * This action requests an alarm to be set for a given time of day. If no time of day is + * specified, an implementation should start an activity that is capable of setting an alarm + * ({@link #EXTRA_SKIP_UI} is ignored in this case). If a time of day is specified, and + * {@link #EXTRA_SKIP_UI} is {@code true}, and the alarm is not repeating, the implementation + * should remove this alarm after it has been dismissed. If an identical alarm exists matching + * all parameters, the implementation may re-use it instead of creating a new one (in this case, + * the alarm should not be removed after dismissal). + * + * This action always enables the alarm. *
** This action requests a timer to be started for a specific {@link #EXTRA_LENGTH length} of - * time. If a timer already exists for this {@link #EXTRA_LENGTH length}, an implementation may - * use it rather than create a new one. If no {@link #EXTRA_LENGTH length} is specified, the - * implementation should start an activity that is capable of setting a timer - * ({@link #EXTRA_SKIP_UI} is ignored in this case). - *
- * An existing timer should only be used if it matches the provided extras and is not currently - * in use. + * time. If no {@link #EXTRA_LENGTH length} is specified, the implementation should start an + * activity that is capable of setting a timer ({@link #EXTRA_SKIP_UI} is ignored in this case). + * If a {@link #EXTRA_LENGTH length} is specified, and {@link #EXTRA_SKIP_UI} is {@code true}, + * the implementation should remove this timer after it has been dismissed. If an identical, + * unused timer exists matching both parameters, an implementation may re-use it instead of + * creating a new one (in this case, the timer should not be removed after dismissal). + * + * This action always starts the timer. *
* *- * Note: If this extra is provided, {@link #EXTRA_DELETE_AFTER_USE} is ignored. - *
*/ public static final String EXTRA_DAYS = "android.intent.extra.alarm.DAYS"; - /** - * Bundle extra: Whether or not to delete this alarm/timer after it's dismissed. - *- * Used by {@link #ACTION_SET_ALARM} and {@link #ACTION_SET_TIMER}. - *
- * If this value is true, the alarm/timer used by this action should be deleted after it's been - * dismissed. The alarm/timer should only be removed if was actually created by the action. If - * an existing alarm/timer was used, it should not be deleted after it's dismissed. - *
- * The value is a {@link Boolean}. - *
- * - * @see #ACTION_SET_ALARM - * @see #ACTION_SET_TIMER - */ - public static final String EXTRA_DELETE_AFTER_USE = "android.intent.extra.alarm.DELETE_AFTER_USE"; - /** * Bundle extra: The hour of the alarm. *