am 0b094d6c: am fd883ca5: am 8647be09: Merge change Id1c0bc24 into eclair

Merge commit '0b094d6c0ffa8cd29fadfe7b1913d3cb2c273dbe'

* commit '0b094d6c0ffa8cd29fadfe7b1913d3cb2c273dbe':
  Correct issue with mail change parsing (fixes #2165649)
This commit is contained in:
Marc Blank 2009-10-12 11:32:12 -07:00 committed by Android Git Automerger
commit e9d0d4f6bf

View File

@ -353,9 +353,7 @@ public class EmailSyncAdapter extends AbstractSyncAdapter {
private void changeParser(ArrayList<ServerChange> changes) throws IOException {
String serverId = null;
Boolean oldRead = false;
Boolean read = null;
Boolean oldFlag = false;
Boolean flag = null;
long id = 0;
while (nextTag(Tags.SYNC_CHANGE) != END) {
switch (tag) {
@ -373,14 +371,27 @@ public class EmailSyncAdapter extends AbstractSyncAdapter {
c.close();
}
break;
case Tags.SYNC_APPLICATION_DATA:
changeApplicationDataParser(changes, oldRead, oldFlag, id);
break;
default:
skipTag();
}
}
}
private void changeApplicationDataParser(ArrayList<ServerChange> changes, Boolean oldRead,
Boolean oldFlag, long id) throws IOException {
Boolean read = null;
Boolean flag = null;
while (nextTag(Tags.SYNC_APPLICATION_DATA) != END) {
switch (tag) {
case Tags.EMAIL_READ:
read = getValueInt() == 1;
break;
case Tags.EMAIL_FLAG:
flag = flagParser();
break;
case Tags.SYNC_APPLICATION_DATA:
break;
default:
skipTag();
}