am 4e424a33
: Merge change Ie093215f into eclair
Merge commit '4e424a33c29446d750790e360e43fb7c83ec0c6f' into eclair-mr2 * commit '4e424a33c29446d750790e360e43fb7c83ec0c6f': Add truncation at 100k (EAS 2.5) and 200k (EAS 12) (#2184807)
This commit is contained in:
commit
7cfda60b2b
@ -63,7 +63,10 @@ public class Eas {
|
||||
public static final String BODY_PREFERENCE_TEXT = "1";
|
||||
public static final String BODY_PREFERENCE_HTML = "2";
|
||||
|
||||
public static final String DEFAULT_BODY_TRUNCATION_SIZE = "50000";
|
||||
// For EAS 12, we use HTML, so we want a larger size than in EAS 2.5
|
||||
public static final String EAS12_TRUNCATION_SIZE = "200000";
|
||||
// For EAS 2.5, truncation is a code; the largest is "7", which is 100k
|
||||
public static final String EAS2_5_TRUNCATION_SIZE = "7";
|
||||
|
||||
public static final int FOLDER_STATUS_OK = 1;
|
||||
public static final int FOLDER_STATUS_INVALID_KEY = 9;
|
||||
|
@ -994,26 +994,25 @@ public class EasSyncService extends AbstractSyncService {
|
||||
}
|
||||
s.data(Tags.SYNC_WINDOW_SIZE,
|
||||
className.equals("Email") ? EMAIL_WINDOW_SIZE : PIM_WINDOW_SIZE);
|
||||
boolean options = false;
|
||||
|
||||
// Handle options
|
||||
s.start(Tags.SYNC_OPTIONS);
|
||||
// Set the lookback appropriately (EAS calls this a "filter") for all but Contacts
|
||||
if (!className.equals("Contacts")) {
|
||||
// Set the lookback appropriately (EAS calls this a "filter")
|
||||
s.start(Tags.SYNC_OPTIONS).data(Tags.SYNC_FILTER_TYPE, getFilterType());
|
||||
options = true;
|
||||
s.data(Tags.SYNC_FILTER_TYPE, getFilterType());
|
||||
}
|
||||
// Set the truncation amount for all classes
|
||||
if (mProtocolVersionDouble >= 12.0) {
|
||||
if (!options) {
|
||||
options = true;
|
||||
s.start(Tags.SYNC_OPTIONS);
|
||||
}
|
||||
s.start(Tags.BASE_BODY_PREFERENCE)
|
||||
// HTML for email; plain text for everything else
|
||||
.data(Tags.BASE_TYPE, (className.equals("Email") ? Eas.BODY_PREFERENCE_HTML
|
||||
: Eas.BODY_PREFERENCE_TEXT))
|
||||
: Eas.BODY_PREFERENCE_TEXT))
|
||||
.data(Tags.BASE_TRUNCATION_SIZE, Eas.EAS12_TRUNCATION_SIZE)
|
||||
.end();
|
||||
} else {
|
||||
s.data(Tags.SYNC_TRUNCATION, Eas.EAS2_5_TRUNCATION_SIZE);
|
||||
}
|
||||
if (options) {
|
||||
s.end();
|
||||
}
|
||||
s.end();
|
||||
|
||||
// Send our changes up to the server
|
||||
target.sendLocalChanges(s);
|
||||
|
Loading…
Reference in New Issue
Block a user