Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27e2fa43 authored by Michael Chan's avatar Michael Chan Committed by Android (Google) Code Review
Browse files

Merge "Added columns to store package name and uri to a custom app"

parents 59a422e9 37960c7f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -16321,12 +16321,14 @@ package android.provider {
  public final class CalendarContract {
    field public static final java.lang.String ACCOUNT_TYPE_LOCAL = "LOCAL";
    field public static final java.lang.String ACTION_EVENT_REMINDER = "android.intent.action.EVENT_REMINDER";
    field public static final java.lang.String ACTION_HANDLE_CUSTOM_EVENT = "android.intent.action.HANDLE_CUSTOM_EVENT";
    field public static final java.lang.String AUTHORITY = "com.android.calendar";
    field public static final java.lang.String CALLER_IS_SYNCADAPTER = "caller_is_syncadapter";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String EXTRA_EVENT_ALL_DAY = "allDay";
    field public static final java.lang.String EXTRA_EVENT_BEGIN_TIME = "beginTime";
    field public static final java.lang.String EXTRA_EVENT_END_TIME = "endTime";
    field public static final java.lang.String EXTRA_EVENT_URI = "eventUri";
  }
  public static final class CalendarContract.Attendees implements android.provider.BaseColumns android.provider.CalendarContract.AttendeesColumns android.provider.CalendarContract.EventsColumns {
@@ -16485,6 +16487,8 @@ package android.provider {
    field public static final int AVAILABILITY_TENTATIVE = 2; // 0x2
    field public static final java.lang.String CALENDAR_ID = "calendar_id";
    field public static final java.lang.String CAN_INVITE_OTHERS = "canInviteOthers";
    field public static final java.lang.String CUSTOM_APP_PACKAGE = "customAppPackage";
    field public static final java.lang.String CUSTOM_APP_URI = "customAppUri";
    field public static final java.lang.String DESCRIPTION = "description";
    field public static final java.lang.String DISPLAY_COLOR = "displayColor";
    field public static final java.lang.String DTEND = "dtend";
+43 −0
Original line number Diff line number Diff line
@@ -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;
@@ -97,6 +98,32 @@ public final class CalendarContract {
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    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";

    }

    /**