summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-05-09 17:01:12 -0700
committerAmith Yamasani <yamasani@google.com>2013-05-09 17:07:08 -0700
commitecd5afe1ef4aa2a5d11ad4fa356fb6d5f461efb4 (patch)
tree66a1d61588c842837f1bc4b8d81675f3aa33d90f /policy
parent2d4edcf2e1ef94ef83e02ec2ad075b3603282812 (diff)
parent069d7e9b81e17d31238e4d60420c3e31bb5e3b2f (diff)
downloadframeworks_base-ecd5afe1ef4aa2a5d11ad4fa356fb6d5f461efb4.zip
frameworks_base-ecd5afe1ef4aa2a5d11ad4fa356fb6d5f461efb4.tar.gz
frameworks_base-ecd5afe1ef4aa2a5d11ad4fa356fb6d5f461efb4.tar.bz2
resolved conflicts for merge of 069d7e9b to master
Change-Id: Ia8fd5de3d4cc275fd358132bcb2c198d1e7b6877
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/MultiUserAvatarCache.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/MultiUserAvatarCache.java b/policy/src/com/android/internal/policy/impl/keyguard/MultiUserAvatarCache.java
new file mode 100644
index 0000000..7969c7d
--- /dev/null
+++ b/policy/src/com/android/internal/policy/impl/keyguard/MultiUserAvatarCache.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy.impl.keyguard;
+
+import android.graphics.drawable.Drawable;
+
+import java.util.HashMap;
+
+public class MultiUserAvatarCache {
+
+ private final HashMap<Integer, Drawable> mCache;
+
+ public MultiUserAvatarCache() {
+ mCache = new HashMap<Integer, Drawable>();
+ }
+
+ public void clear(int userId) {
+ mCache.remove(userId);
+ }
+
+ public Drawable get(int userId) {
+ return mCache.get(userId);
+ }
+
+ public void put(int userId, Drawable image) {
+ mCache.put(userId, image);
+ }
+}