diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-03-26 18:31:48 +0100 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2014-03-31 20:58:31 +0200 |
commit | 5cf17879a31b7b78c09ec50b727f921840dcf783 (patch) | |
tree | 0e3d1a52b1c275676c80c6f90dd516a4d8e292cb /packages/Keyguard/src/com/android/keyguard/MultiUserAvatarCache.java | |
parent | 085226c40f21a4467f047b901c7640e2215828d8 (diff) | |
download | frameworks_base-5cf17879a31b7b78c09ec50b727f921840dcf783.zip frameworks_base-5cf17879a31b7b78c09ec50b727f921840dcf783.tar.gz frameworks_base-5cf17879a31b7b78c09ec50b727f921840dcf783.tar.bz2 |
Reuse KeyguardViewMediator for new Keyguard implementation.
This change reuses KeyguardViewMediator for the new Keyguard
implementation in status bar. KeyguardViewManager is replaced by
StatusBarKeyguardManager which handles adding the view, setting the
state etc. StatusBarWindowManager is introduced to managed the window
of the status bar, which has the logic of both the old Keyguard window
and the old status bar window. In the current implementation, Keyguard
gets displayed like it would be in the bouncer state, but that's likely
to change in the future. Also, setHidden in IKeyguardService is also
renamed to setOccluded, as the word hidden interferes with the
terminology when dismissing the Keyguard.
Bug: 13635952
Change-Id: I1c5d5a49d810d8532089f464cb2efe35e577f517
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/MultiUserAvatarCache.java')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/MultiUserAvatarCache.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/MultiUserAvatarCache.java b/packages/Keyguard/src/com/android/keyguard/MultiUserAvatarCache.java index 9930e72..7128211 100644 --- a/packages/Keyguard/src/com/android/keyguard/MultiUserAvatarCache.java +++ b/packages/Keyguard/src/com/android/keyguard/MultiUserAvatarCache.java @@ -22,12 +22,21 @@ import java.util.HashMap; public class MultiUserAvatarCache { + private static MultiUserAvatarCache sInstance; + private final HashMap<Integer, Drawable> mCache; - public MultiUserAvatarCache() { + private MultiUserAvatarCache() { mCache = new HashMap<Integer, Drawable>(); } + public static MultiUserAvatarCache getInstance() { + if (sInstance == null) { + sInstance = new MultiUserAvatarCache(); + } + return sInstance; + } + public void clear(int userId) { mCache.remove(userId); } |