From c99c0e2297f7f8e8b532d39a55c5114c62e8d101 Mon Sep 17 00:00:00 2001 From: Christine Franks Date: Tue, 13 Jun 2017 15:26:09 -0700 Subject: Add ACTION_DISMISS_TIMER intent Bug: 38475809 Test: manual - visual inspection of code Change-Id: I9e58c9699fc2e6afad38db6b44f2e2b649564327 --- core/java/android/provider/AlarmClock.java | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/core/java/android/provider/AlarmClock.java b/core/java/android/provider/AlarmClock.java index d921ed409d6c..f9030124cc63 100644 --- a/core/java/android/provider/AlarmClock.java +++ b/core/java/android/provider/AlarmClock.java @@ -82,7 +82,8 @@ public final class AlarmClock { * If neither of the above are given then: * *

* If the extra {@link #EXTRA_ALARM_SEARCH_MODE} is used, and the search results contain two or @@ -104,8 +105,7 @@ public final class AlarmClock { * @see #EXTRA_ALARM_SEARCH_MODE */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) - public static final String ACTION_DISMISS_ALARM = - "android.intent.action.DISMISS_ALARM"; + public static final String ACTION_DISMISS_ALARM = "android.intent.action.DISMISS_ALARM"; /** * Activity Action: Snooze a currently ringing alarm. @@ -124,8 +124,7 @@ public final class AlarmClock { * @see #EXTRA_ALARM_SNOOZE_DURATION */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) - public static final String ACTION_SNOOZE_ALARM = - "android.intent.action.SNOOZE_ALARM"; + public static final String ACTION_SNOOZE_ALARM = "android.intent.action.SNOOZE_ALARM"; /** * Activity Action: Set a timer. @@ -154,6 +153,16 @@ public final class AlarmClock { @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_SET_TIMER = "android.intent.action.SET_TIMER"; + /** + * Activity Action: Dismiss timers. + *

+ * Dismiss all currently expired timers. If there are no expired timers, then this is a no-op. + *

+ * @hide + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_DISMISS_TIMER = "android.intent.action.DISMISS_TIMER"; + /** * Activity Action: Show the timers. *

@@ -200,8 +209,7 @@ public final class AlarmClock { * @see #ALARM_SEARCH_MODE_LABEL * @see #ACTION_DISMISS_ALARM */ - public static final String EXTRA_ALARM_SEARCH_MODE = - "android.intent.extra.alarm.SEARCH_MODE"; + public static final String EXTRA_ALARM_SEARCH_MODE = "android.intent.extra.alarm.SEARCH_MODE"; /** * Search for the alarm that is most closely matched by the search parameters -- cgit v1.2.3-59-g8ed1b