fix expedited syncs. there were times when an expedited sync wouldn't
correctly preempt non-expedited syncs
Change-Id: Ia88ce6504c06d7c8e50e40362e8bf2b85bd0934b
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index d821918..6c7e940 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -221,6 +221,7 @@
long upstreamActivity;
long downstreamActivity;
String mesg;
+ boolean initialization;
}
public static class DayStats {
@@ -1012,7 +1013,7 @@
* Note that sync has started for the given account and authority.
*/
public long insertStartSyncEvent(Account accountName, int userId, String authorityName,
- long now, int source) {
+ long now, int source, boolean initialization) {
long id;
synchronized (mAuthorities) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
@@ -1025,6 +1026,7 @@
return -1;
}
SyncHistoryItem item = new SyncHistoryItem();
+ item.initialization = initialization;
item.authorityId = authority.ident;
item.historyId = mNextHistoryId++;
if (mNextHistoryId < 0) mNextHistoryId = 0;