Skip to content

Commit 4f52061

Browse files
committed
Add a warning to changing colors in the docs
Change-Id: Ia1fdfd5e2c31c5665fb08ccc389957b6af6f3736
1 parent cb99512 commit 4f52061

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

core/java/android/provider/CalendarContract.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ protected interface SyncColumns extends CalendarSyncColumns {
292292
*/
293293
protected interface CalendarColumns {
294294
/**
295-
* The color of the calendar
295+
* The color of the calendar. This should only be updated by the sync
296+
* adapter, not other apps, as changing a calendar's color can adversely
297+
* affect its display.
296298
* <P>Type: INTEGER (color value)</P>
297299
*/
298300
public static final String CALENDAR_COLOR = "calendar_color";
@@ -551,14 +553,14 @@ public Entity getEntityAndIncrementCursor(Cursor cursor) throws RemoteException
551553
* <ul>
552554
* <li>{@link #NAME}</li>
553555
* <li>{@link #CALENDAR_DISPLAY_NAME}</li>
554-
* <li>{@link #CALENDAR_COLOR}</li>
555556
* <li>{@link #VISIBLE}</li>
556557
* <li>{@link #SYNC_EVENTS}</li>
557558
* </ul>
558559
* The following Calendars columns are writable only by a sync adapter
559560
* <ul>
560561
* <li>{@link #ACCOUNT_NAME}</li>
561562
* <li>{@link #ACCOUNT_TYPE}</li>
563+
* <li>{@link #CALENDAR_COLOR}</li>
562564
* <li>{@link #_SYNC_ID}</li>
563565
* <li>{@link #DIRTY}</li>
564566
* <li>{@link #OWNER_ACCOUNT}</li>
@@ -785,7 +787,8 @@ protected interface EventsColumns {
785787
public static final String EVENT_LOCATION = "eventLocation";
786788

787789
/**
788-
* A secondary color for the individual event. Column name.
790+
* A secondary color for the individual event. Reserved for future use.
791+
* Column name.
789792
* <P>Type: INTEGER</P>
790793
*/
791794
public static final String EVENT_COLOR = "eventColor";

0 commit comments

Comments
 (0)