summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/SyncQueue.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/content/SyncQueue.java')
-rw-r--r--core/java/android/content/SyncQueue.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/content/SyncQueue.java b/core/java/android/content/SyncQueue.java
index 06da6fa..c18c86b 100644
--- a/core/java/android/content/SyncQueue.java
+++ b/core/java/android/content/SyncQueue.java
@@ -117,6 +117,19 @@ public class SyncQueue {
return true;
}
+ public void removeUser(int userId) {
+ ArrayList<SyncOperation> opsToRemove = new ArrayList<SyncOperation>();
+ for (SyncOperation op : mOperationsMap.values()) {
+ if (op.userId == userId) {
+ opsToRemove.add(op);
+ }
+ }
+
+ for (SyncOperation op : opsToRemove) {
+ remove(op);
+ }
+ }
+
/**
* Remove the specified operation if it is in the queue.
* @param operation the operation to remove