summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorMichael Chan <chanm@google.com>2012-04-19 15:52:17 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-19 15:52:17 -0700
commit27e2fa43dbb4ebf2824a21a6c5f05c8b45513f52 (patch)
tree30ecee7d2d4b7c2fa6e24aee6a1f9d83c3fda744 /core/java
parent59a422e90035ce5df45c526607db2d3303e3112e (diff)
parent37960c7f58197404d2331a0ea81194ffc98552c1 (diff)
downloadframeworks_base-27e2fa43dbb4ebf2824a21a6c5f05c8b45513f52.zip
frameworks_base-27e2fa43dbb4ebf2824a21a6c5f05c8b45513f52.tar.gz
frameworks_base-27e2fa43dbb4ebf2824a21a6c5f05c8b45513f52.tar.bz2
Merge "Added columns to store package name and uri to a custom app"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/provider/CalendarContract.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index c4aa691..f6a6da6 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -19,6 +19,7 @@ package android.provider;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.ContentProviderClient;
@@ -98,6 +99,32 @@ public final class CalendarContract {
public static final String ACTION_EVENT_REMINDER = "android.intent.action.EVENT_REMINDER";
/**
+ * Activity Action: Display the event to the user in the custom app as
+ * specified in {@link EventsColumns#CUSTOM_APP_PACKAGE}. The custom app
+ * will be started via {@link Activity#startActivityForResult(Intent, int)}
+ * and it should call {@link Activity#setResult(int)} with
+ * {@link Activity#RESULT_OK} or {@link Activity#RESULT_CANCELED} to
+ * acknowledge whether the action was handled or not.
+ * <p>
+ * Input: {@link Intent#getData} has the event URI. The extra
+ * {@link #EXTRA_EVENT_BEGIN_TIME} has the start time of the instance. The
+ * extra {@link #EXTRA_CUSTOM_APP_URI} will have the
+ * {@link EventsColumns#CUSTOM_APP_URI}.
+ * <p>
+ * Output: {@link Activity#RESULT_OK} if this was handled; otherwise
+ * {@link Activity#RESULT_CANCELED}
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_HANDLE_CUSTOM_EVENT =
+ "android.provider.calendar.action.HANDLE_CUSTOM_EVENT";
+
+ /**
+ * Intent Extras key: {@link EventsColumns#CUSTOM_APP_URI} for the event in
+ * the {@link #ACTION_HANDLE_CUSTOM_EVENT} intent
+ */
+ public static final String EXTRA_CUSTOM_APP_URI = "eventUri";
+
+ /**
* Intent Extras key: The start time of an event or an instance of a
* recurring event. (milliseconds since epoch)
*/
@@ -1176,6 +1203,22 @@ public final class CalendarContract {
* <P>Type: INTEGER (boolean, readonly)</P>
*/
public static final String CAN_INVITE_OTHERS = "canInviteOthers";
+
+ /**
+ * The package name of the custom app that can provide a richer
+ * experience for the event. See the ACTION TYPE
+ * {@link CalendarContract#ACTION_HANDLE_CUSTOM_EVENT} for details.
+ * Column name.
+ * <P> Type: TEXT </P>
+ */
+ public static final String CUSTOM_APP_PACKAGE = "customAppPackage";
+
+ /**
+ * The URI used by the custom app for the event. Column name.
+ * <P>Type: TEXT</P>
+ */
+ public static final String CUSTOM_APP_URI = "customAppUri";
+
}
/**