From 633bf5ca52536e1a009b21603e684b7e393df385 Mon Sep 17 00:00:00 2001 From: Johnson Hsieh Date: Wed, 1 Apr 2015 01:33:31 -0700 Subject: Add VOICE_CANCEL_ALARM/VOICE_DELETE_ALARM intents. This will be used by the Voice Interaction API. For details, see https://docs.google.com/document/d/1_yRTbn-BxFi8Lc6bVmJ4r2dg3-05qUxf9yChiZXiiew/edit#. Change-Id: Icf4371ff351298ef7c1158e5e2d35561fc6cef67 --- core/java/android/provider/AlarmClock.java | 144 ++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 1 deletion(-) (limited to 'core/java') diff --git a/core/java/android/provider/AlarmClock.java b/core/java/android/provider/AlarmClock.java index 724d76d..25a35e1 100644 --- a/core/java/android/provider/AlarmClock.java +++ b/core/java/android/provider/AlarmClock.java @@ -43,8 +43,14 @@ public final class AlarmClock { * 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 activity could also be started in Voice Interaction mode. The activity should check + * {@link android.app.Activity#isVoiceInteraction}, and if true, the implementation should + * report a deeplink of the created/enabled alarm using + * {@link android.app.VoiceInteractor.CompleteVoiceRequest}. This allows follow-on voice actions + * such as {@link #ACTION_VOICE_CANCEL_ALARM} to cancel the alarm that was just enabled. *

*

Request parameters

*