Add foreground and background color cols to folder.
Change-Id: I0cbbed2b6dff2e68a652dea005321af9b2e707aa
diff --git a/src/com/android/mail/providers/Folder.java b/src/com/android/mail/providers/Folder.java
index 64d98e0..29cb339 100644
--- a/src/com/android/mail/providers/Folder.java
+++ b/src/com/android/mail/providers/Folder.java
@@ -120,6 +120,9 @@
*/
public long iconResId;
+ public String bgColor;
+ public String fgColor;
+
/**
* Total number of members that comprise an instance of a folder. This is
* the number of members that need to be serialized or parceled.
@@ -166,6 +169,8 @@
lastSyncResult = in.readInt();
type = in.readInt();
iconResId = in.readLong();
+ bgColor = in.readString();
+ fgColor = in.readString();
}
public Folder(Cursor cursor) {
@@ -189,6 +194,8 @@
lastSyncResult = cursor.getInt(UIProvider.FOLDER_LAST_SYNC_RESULT_COLUMN);
type = cursor.getInt(UIProvider.FOLDER_TYPE_COLUMN);
iconResId = cursor.getLong(UIProvider.FOLDER_ICON_RES_ID_COLUMN);
+ bgColor = cursor.getString(UIProvider.FOLDER_BG_COLOR_COLUMN);
+ fgColor = cursor.getString(UIProvider.FOLDER_FG_COLOR_COLUMN);
}
@Override
@@ -209,6 +216,8 @@
dest.writeInt(lastSyncResult);
dest.writeInt(type);
dest.writeLong(iconResId);
+ dest.writeString(bgColor);
+ dest.writeString(fgColor);
}
/**
@@ -230,7 +239,9 @@
out.append(syncStatus).append(FOLDER_COMPONENT_SEPARATOR);
out.append(lastSyncResult).append(FOLDER_COMPONENT_SEPARATOR);
out.append(type).append(FOLDER_COMPONENT_SEPARATOR);
- out.append(iconResId);
+ out.append(iconResId).append(FOLDER_COMPONENT_SEPARATOR);
+ out.append(bgColor).append(FOLDER_COMPONENT_SEPARATOR);
+ out.append(fgColor);
return out.toString();
}
@@ -281,6 +292,8 @@
lastSyncResult = Integer.valueOf(folderMembers[12]);
type = Integer.valueOf(folderMembers[13]);
iconResId = Long.valueOf(folderMembers[14]);
+ bgColor = folderMembers[15];
+ fgColor = folderMembers[16];
}
/**
diff --git a/src/com/android/mail/providers/UIProvider.java b/src/com/android/mail/providers/UIProvider.java
index 8b19f99..428c4b0 100644
--- a/src/com/android/mail/providers/UIProvider.java
+++ b/src/com/android/mail/providers/UIProvider.java
@@ -353,7 +353,9 @@
FolderColumns.SYNC_STATUS,
FolderColumns.LAST_SYNC_RESULT,
FolderColumns.TYPE,
- FolderColumns.ICON_RES_ID
+ FolderColumns.ICON_RES_ID,
+ FolderColumns.BG_COLOR,
+ FolderColumns.FG_COLOR
};
public static final int FOLDER_ID_COLUMN = 0;
@@ -371,6 +373,8 @@
public static final int FOLDER_LAST_SYNC_RESULT_COLUMN = 12;
public static final int FOLDER_TYPE_COLUMN = 13;
public static final int FOLDER_ICON_RES_ID_COLUMN = 14;
+ public static final int FOLDER_BG_COLOR_COLUMN = 15;
+ public static final int FOLDER_FG_COLOR_COLUMN = 16;
public static final class FolderType {
public static final int DEFAULT = 0;
@@ -463,6 +467,16 @@
* This int column contains the type of the folder. Zero is default.
*/
public static final String TYPE = "type";
+ /**
+ * String representing the integer background color associated with this
+ * folder, or null.
+ */
+ public static final String BG_COLOR = "bgColor";
+ /**
+ * String representing the integer of the foreground color associated
+ * with this folder, or null.
+ */
+ public static final String FG_COLOR = "fgColor";
public FolderColumns() {}
}