Change logging command to help debug Moto issue (#2165649)
* It has been reported that messages for a particular user are not staying in sync re: deletions via PC * This hasn't been reported elsewhere * The new logging command logs the subject of deleted messages which will help track down the problem * I have also requested, and expect to receive, an account on the Moto server in question to try to replicate the issue Requesting Dr. No approval for this important change to user logging code. Change-Id: I13229d843ef828b54f3514bdded5a7561a87989a
This commit is contained in:
parent
bb7a6c5463
commit
b3e449edf9
@ -62,6 +62,9 @@ public class EmailSyncAdapter extends AbstractSyncAdapter {
|
||||
private static final String[] UPDATES_PROJECTION =
|
||||
{MessageColumns.FLAG_READ, MessageColumns.MAILBOX_KEY, SyncColumns.SERVER_ID,
|
||||
MessageColumns.FLAG_FAVORITE};
|
||||
private static final String[] MESSAGE_ID_SUBJECT_PROJECTION =
|
||||
new String[] { Message.RECORD_ID, MessageColumns.SUBJECT };
|
||||
|
||||
|
||||
String[] bindArguments = new String[2];
|
||||
|
||||
@ -317,11 +320,13 @@ public class EmailSyncAdapter extends AbstractSyncAdapter {
|
||||
case Tags.SYNC_SERVER_ID:
|
||||
String serverId = getValue();
|
||||
// Find the message in this mailbox with the given serverId
|
||||
Cursor c = getServerIdCursor(serverId, Message.ID_COLUMN_PROJECTION);
|
||||
Cursor c = getServerIdCursor(serverId, MESSAGE_ID_SUBJECT_PROJECTION);
|
||||
try {
|
||||
if (c.moveToFirst()) {
|
||||
userLog("Deleting ", serverId);
|
||||
deletes.add(c.getLong(Message.ID_COLUMNS_ID_COLUMN));
|
||||
deletes.add(c.getLong(0));
|
||||
if (Eas.USER_LOG) {
|
||||
userLog("Deleting ", serverId + ", " + c.getString(1));
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
c.close();
|
||||
|
Loading…
Reference in New Issue
Block a user