Improve the javadoc for cross profile calendar uris.

Test: manual
Bug: 123625889
Change-Id: If3015774428aa772801871a56c582c16935a7d63
Bu: 126904569
Bug: 126700505
diff --git a/api/current.txt b/api/current.txt
index f1b5459..051552e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -36845,7 +36845,7 @@
     field public static final String CALENDAR_LOCATION = "calendar_location";
     field public static final android.net.Uri CONTENT_URI;
     field public static final String DEFAULT_SORT_ORDER = "calendar_displayName";
-    field public static final android.net.Uri ENTERPRISE_CONTENT_URI;
+    field @NonNull public static final android.net.Uri ENTERPRISE_CONTENT_URI;
     field public static final String NAME = "name";
   }
 
@@ -36874,7 +36874,7 @@
   public static final class CalendarContract.Events implements android.provider.BaseColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.EventsColumns android.provider.CalendarContract.SyncColumns {
     field public static final android.net.Uri CONTENT_EXCEPTION_URI;
     field public static final android.net.Uri CONTENT_URI;
-    field public static final android.net.Uri ENTERPRISE_CONTENT_URI;
+    field @NonNull public static final android.net.Uri ENTERPRISE_CONTENT_URI;
   }
 
   protected static interface CalendarContract.EventsColumns {
@@ -36966,10 +36966,10 @@
     field public static final String END = "end";
     field public static final String END_DAY = "endDay";
     field public static final String END_MINUTE = "endMinute";
-    field public static final android.net.Uri ENTERPRISE_CONTENT_BY_DAY_URI;
-    field public static final android.net.Uri ENTERPRISE_CONTENT_SEARCH_BY_DAY_URI;
-    field public static final android.net.Uri ENTERPRISE_CONTENT_SEARCH_URI;
-    field public static final android.net.Uri ENTERPRISE_CONTENT_URI;
+    field @NonNull public static final android.net.Uri ENTERPRISE_CONTENT_BY_DAY_URI;
+    field @NonNull public static final android.net.Uri ENTERPRISE_CONTENT_SEARCH_BY_DAY_URI;
+    field @NonNull public static final android.net.Uri ENTERPRISE_CONTENT_SEARCH_URI;
+    field @NonNull public static final android.net.Uri ENTERPRISE_CONTENT_URI;
     field public static final String EVENT_ID = "event_id";
     field public static final String START_DAY = "startDay";
     field public static final String START_MINUTE = "startMinute";
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index 5d34aa6..fa244e4 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -766,15 +766,13 @@
         public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/calendars");
 
         /**
-         * The content:// style URL for querying Calendars table in the managed profile. Appending a
-         * calendar id using {@link ContentUris#withAppendedId(Uri, long)} will
-         * specify a single calendar.
+         * The content:// style URL for querying Calendars table in the managed profile. Appending
+         * a calendar id using {@link ContentUris#withAppendedId(Uri, long)} specifies
+         * a single calendar.
          *
          * <p>The following columns are allowed to be queried via this uri:
          * <ul>
          * <li>{@link #_ID}</li>
-         * <li>{@link #NAME}</li>
-         * <li>{@link #CALENDAR_DISPLAY_NAME}</li>
          * <li>{@link #CALENDAR_COLOR}</li>
          * <li>{@link #VISIBLE}</li>
          * <li>{@link #CALENDAR_LOCATION}</li>
@@ -782,18 +780,22 @@
          * <li>{@link #IS_PRIMARY}</li>
          * </ul>
          *
-         * <p>{@link IllegalArgumentException} will be thrown if there exist columns in the
+         * <p>{@link IllegalArgumentException} is thrown if there exists columns in the
          * projection of the query to this uri that are not contained in the above list.
          *
-         * <p>This uri will return an empty cursor if the calling user is not a parent profile
-         * of a managed profile, or cross-profile calendar is disabled in Settings, or this uri is
-         * queried from a package that is not whitelisted by profile owner of the managed profile
-         * via
+         * <p>This uri returns an empty cursor if the calling user is not a parent profile
+         * of a managed profile, or the managed profile is disabled, or cross-profile calendar is
+         * disabled in Settings, or this uri is queried from a package that is not allowed by
+         * the profile owner of the managed profile via
          * {@link DevicePolicyManager#setCrossProfileCalendarPackages(ComponentName, Set)}.
          *
+         * <p>Apps can register a {@link android.database.ContentObserver} for this URI to listen
+         * to changes.
+         *
          * @see DevicePolicyManager#getCrossProfileCalendarPackages(ComponentName)
          * @see Settings.Secure#CROSS_PROFILE_CALENDAR_ENABLED
          */
+        @NonNull
         public static final Uri ENTERPRISE_CONTENT_URI =
                 Uri.parse("content://" + AUTHORITY + "/enterprise/calendars");
 
@@ -1747,8 +1749,7 @@
 
         /**
          * The content:// style URL for querying Events table in the managed profile. Appending an
-         * event id using {@link ContentUris#withAppendedId(Uri, long)} will
-         * specify a single event.
+         * event id using {@link ContentUris#withAppendedId(Uri, long)} specifies a single event.
          *
          * <p>The following columns are allowed to be queried via this uri:
          * <ul>
@@ -1767,26 +1768,33 @@
          * <li>{@link #AVAILABILITY}</li>
          * <li>{@link #RRULE}</li>
          * <li>{@link #RDATE}</li>
+         * <li>{@link #LAST_DATE}</li>
          * <li>{@link #EXRULE}</li>
          * <li>{@link #EXDATE}</li>
-         * <li>{@link #CALENDAR_DISPLAY_NAME}</li>
+         * <li>{@link #SELF_ATTENDEE_STATUS}</li>
+         * <li>{@link #DISPLAY_COLOR}</li>
          * <li>{@link #CALENDAR_COLOR}</li>
          * <li>{@link #VISIBLE}</li>
          * <li>{@link #CALENDAR_TIME_ZONE}</li>
+         * <li>{@link #IS_PRIMARY}</li>
          * </ul>
          *
-         * <p>{@link IllegalArgumentException} will be thrown if there exist columns in the
+         * <p>{@link IllegalArgumentException} is thrown if there exists columns in the
          * projection of the query to this uri that are not contained in the above list.
          *
-         * <p>This uri will return an empty cursor if the calling user is not a parent profile
-         * of a managed profile, or cross-profile calendar is disabled in Settings, or this uri is
-         * queried from a package that is not whitelisted by profile owner of the managed profile
-         * via
+         * <p>This uri returns an empty cursor if the calling user is not a parent profile
+         * of a managed profile, or the managed profile is disabled, or cross-profile calendar is
+         * disabled in Settings, or this uri is queried from a package that is not allowed by
+         * the profile owner of the managed profile via
          * {@link DevicePolicyManager#setCrossProfileCalendarPackages(ComponentName, Set)}.
          *
+         * <p>Apps can register a {@link android.database.ContentObserver} for this URI to listen
+         * to changes.
+         *
          * @see DevicePolicyManager#getCrossProfileCalendarPackages(ComponentName)
          * @see Settings.Secure#CROSS_PROFILE_CALENDAR_ENABLED
          */
+        @NonNull
         public static final Uri ENTERPRISE_CONTENT_URI =
                 Uri.parse("content://" + AUTHORITY + "/enterprise/events");
 
@@ -1974,7 +1982,7 @@
          * The content:// style URL for querying an instance range in the managed profile.
          * It supports similar semantics as {@link #CONTENT_URI}.
          *
-         * <p>The following columns plus the columns that are whitelisted by
+         * <p>The following columns plus the columns that are allowed by
          * {@link Events#ENTERPRISE_CONTENT_URI} are allowed to be queried via this uri:
          * <ul>
          * <li>{@link #_ID}</li>
@@ -1987,18 +1995,19 @@
          * <li>{@link #END_MINUTE}</li>
          * </ul>
          *
-         * <p>{@link IllegalArgumentException} will be thrown if there exist columns in the
+         * <p>{@link IllegalArgumentException} is thrown if there exists columns in the
          * projection of the query to this uri that are not contained in the above list.
          *
-         * <p>This uri will return an empty cursor if the calling user is not a parent profile
-         * of a managed profile, or cross-profile calendar for the managed profile is disabled in
-         * Settings, or this uri is queried from a package that is not whitelisted by
-         * profile owner of the managed profile via
+         * <p>This uri returns an empty cursor if the calling user is not a parent profile
+         * of a managed profile, or the managed profile is disabled, or cross-profile calendar is
+         * disabled in Settings, or this uri is queried from a package that is not allowed by
+         * the profile owner of the managed profile via
          * {@link DevicePolicyManager#setCrossProfileCalendarPackages(ComponentName, Set)}.
          *
          * @see DevicePolicyManager#getCrossProfileCalendarPackages(ComponentName)
          * @see Settings.Secure#CROSS_PROFILE_CALENDAR_ENABLED
          */
+        @NonNull
         public static final Uri ENTERPRISE_CONTENT_URI =
                 Uri.parse("content://" + AUTHORITY + "/enterprise/instances/when");
 
@@ -2007,6 +2016,7 @@
          * Day in the managed profile. It supports similar semantics as {@link #CONTENT_BY_DAY_URI}
          * and performs similar checks as {@link #ENTERPRISE_CONTENT_URI}.
          */
+        @NonNull
         public static final Uri ENTERPRISE_CONTENT_BY_DAY_URI =
                 Uri.parse("content://" + AUTHORITY + "/enterprise/instances/whenbyday");
 
@@ -2015,6 +2025,7 @@
          * term in the managed profile. It supports similar semantics as {@link #CONTENT_SEARCH_URI}
          * and performs similar checks as {@link #ENTERPRISE_CONTENT_URI}.
          */
+        @NonNull
         public static final Uri ENTERPRISE_CONTENT_SEARCH_URI =
                 Uri.parse("content://" + AUTHORITY + "/enterprise/instances/search");
 
@@ -2024,6 +2035,7 @@
          * {@link #CONTENT_SEARCH_BY_DAY_URI} and performs similar checks as
          * {@link #ENTERPRISE_CONTENT_URI}.
          */
+        @NonNull
         public static final Uri ENTERPRISE_CONTENT_SEARCH_BY_DAY_URI =
                 Uri.parse("content://" + AUTHORITY + "/enterprise/instances/searchbyday");