Fix build break (Calendar field changed name)
Change-Id: I9532c459f3cf624fa88269370fa36d191481e500
diff --git a/src/com/android/exchange/adapter/CalendarSyncAdapter.java b/src/com/android/exchange/adapter/CalendarSyncAdapter.java
index b9fea2d..92a7a45 100644
--- a/src/com/android/exchange/adapter/CalendarSyncAdapter.java
+++ b/src/com/android/exchange/adapter/CalendarSyncAdapter.java
@@ -79,7 +79,7 @@
Events.CALENDAR_ID + "=?";
private static final String DIRTY_IN_CALENDAR =
Events._SYNC_DIRTY + "=1 AND " + Events.CALENDAR_ID + "=?";
- private static final String CLIENT_ID_SELECTION = Events._SYNC_LOCAL_ID + "=?";
+ private static final String CLIENT_ID_SELECTION = Events._SYNC_DATA + "=?";
private static final String ATTENDEES_EXCEPT_ORGANIZER = Attendees.EVENT_ID + "=? AND " +
Attendees.ATTENDEE_RELATIONSHIP + "!=" + Attendees.RELATIONSHIP_ORGANIZER;
private static final String[] ID_PROJECTION = new String[] {Events._ID};
@@ -341,7 +341,7 @@
// The following are fields we should save (for changes), though they don't
// relate to data used by CalendarProvider at this point
case Tags.CALENDAR_UID:
- cv.put(Events._SYNC_LOCAL_ID, getValue());
+ cv.put(Events._SYNC_DATA, getValue());
break;
case Tags.CALENDAR_DTSTAMP:
ops.newExtendedProperty("dtstamp", getValue());
@@ -818,7 +818,7 @@
try {
if (c.moveToFirst()) {
cv.put(Events._SYNC_ID, serverId);
- cv.put(Events._SYNC_LOCAL_ID, clientId);
+ cv.put(Events._SYNC_DATA, clientId);
long id = c.getLong(0);
// Write the serverId into the Event
mOps.add(ContentProviderOperation.newUpdate(
@@ -1186,7 +1186,7 @@
String serverId = entityValues.getAsString(Events._SYNC_ID);
// Find our uid in the entity; otherwise create one
- String clientId = entityValues.getAsString(Events._SYNC_LOCAL_ID);
+ String clientId = entityValues.getAsString(Events._SYNC_DATA);
if (clientId == null) {
clientId = UUID.randomUUID().toString();
}
@@ -1212,7 +1212,7 @@
userLog("Creating new event with clientId: ", clientId);
s.start(Tags.SYNC_ADD).data(Tags.SYNC_CLIENT_ID, clientId);
// And save it in the Event as the local id
- cidValues.put(Events._SYNC_LOCAL_ID, clientId);
+ cidValues.put(Events._SYNC_DATA, clientId);
cr.update(ContentUris.withAppendedId(uri, eventId), cidValues, null, null);
} else {
if (entityValues.getAsInteger(Events.DELETED) == 1) {
diff --git a/src/com/android/exchange/utility/CalendarUtilities.java b/src/com/android/exchange/utility/CalendarUtilities.java
index 4d3069d..031fdbe 100644
--- a/src/com/android/exchange/utility/CalendarUtilities.java
+++ b/src/com/android/exchange/utility/CalendarUtilities.java
@@ -878,7 +878,7 @@
ics.writeTag("PRIORITY", "5"); // 1 to 9, 5 = medium
ics.writeTag("SEQUENCE", "0");
if (uid == null) {
- uid = entityValues.getAsString(Events._SYNC_LOCAL_ID);
+ uid = entityValues.getAsString(Events._SYNC_DATA);
}
if (uid != null) {
ics.writeTag("UID", uid);