summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/SyncQueue.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2012-03-22 16:16:17 -0700
committerAmith Yamasani <yamasani@google.com>2012-03-27 11:23:01 -0700
commit135936072b24b090fb63940aea41b408d855a4f3 (patch)
treec10e6a7642df4246937bb6fbd7277b642daf3eee /core/java/android/content/SyncQueue.java
parent0c44525a4888de321c9497204d59c8515f828499 (diff)
downloadframeworks_base-135936072b24b090fb63940aea41b408d855a4f3.zip
frameworks_base-135936072b24b090fb63940aea41b408d855a4f3.tar.gz
frameworks_base-135936072b24b090fb63940aea41b408d855a4f3.tar.bz2
User management and switching
Broadcast intents that get sent out when users are added/removed/switched. More work on generating user-specific information in package manager queries. APIs to update user name and query a user by id. Removed Package.mSetStopped and mSetEnabled, since they're not user specific. User removal: - Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService and AccountManager. - Shutdown processes belonging to the user. Don't show vibrate option in long-press power if there's no vibrator. Lock the screen when switching users, to force unlocking. Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
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