Use a single account color resource table; add convenience methods
* The color chip resource table was duplicated in three files
* Move these into a common location in Email.java and add
convenience method for retrieving color chip resource id based
on accountId
* Simplifies future changes to account color selection
* Add RGB color information on these resources (provided by
rfulcher) and add a convenience method for retrieving these
Change-Id: If1c2d22fba91cfce46a2618cd2b73cf7a534ce51
diff --git a/src/com/android/exchange/adapter/FolderSyncParser.java b/src/com/android/exchange/adapter/FolderSyncParser.java
index b760dfd..f2e5d61 100644
--- a/src/com/android/exchange/adapter/FolderSyncParser.java
+++ b/src/com/android/exchange/adapter/FolderSyncParser.java
@@ -255,7 +255,7 @@
cv.put(Calendars.SELECTED, 1);
cv.put(Calendars.HIDDEN, 0);
// TODO Find out how to set color!!
- cv.put(Calendars.COLOR, 0xFF228B22 /*green*/);
+ cv.put(Calendars.COLOR, Email.getAccountColor(mAccountId));
cv.put(Calendars.TIMEZONE, Time.getCurrentTimezone());
cv.put(Calendars.ACCESS_LEVEL, Calendars.OWNER_ACCESS);
cv.put(Calendars.OWNER_ACCOUNT, mAccount.mEmailAddress);