diff options
author | Zoltan Szatmary-Ban <szatmz@google.com> | 2014-12-19 16:27:45 +0000 |
---|---|---|
committer | Zoltan Szatmary-Ban <szatmz@google.com> | 2015-03-09 16:58:48 +0000 |
commit | e5814ffb1843e476af3f90f00bc12837591f915e (patch) | |
tree | 51c8868b856a90de147a19f9066bc083f63c62e1 /src/com/android/settings/users | |
parent | bc614dfcb59a8a58dbb20e54535e58aba69bd27c (diff) | |
download | packages_apps_Settings-e5814ffb1843e476af3f90f00bc12837591f915e.zip packages_apps_Settings-e5814ffb1843e476af3f90f00bc12837591f915e.tar.gz packages_apps_Settings-e5814ffb1843e476af3f90f00bc12837591f915e.tar.bz2 |
Make default user icons retrievable as cached bitmaps
Also invoke that method where formerly we did a UserIcon.convertBitmap(
UserIcon.getDefaultUserIcon(...)) call.
Bug: 19620707
Change-Id: I2ae3bbcee7d1c6515f0f6253925ef9837d8e3548
Diffstat (limited to 'src/com/android/settings/users')
-rw-r--r-- | src/com/android/settings/users/UserSettings.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java index dbd0481..e54ea9f 100644 --- a/src/com/android/settings/users/UserSettings.java +++ b/src/com/android/settings/users/UserSettings.java @@ -872,8 +872,7 @@ public class UserSettings extends SettingsPreferenceFragment for (int userId : values[0]) { Bitmap bitmap = mUserManager.getUserIcon(userId); if (bitmap == null) { - bitmap = UserIcons.convertToBitmap(UserIcons.getDefaultUserIcon(userId, - /* light= */ false)); + bitmap = Utils.getDefaultUserIconAsBitmap(userId); } mUserIcons.append(userId, bitmap); } @@ -889,15 +888,13 @@ public class UserSettings extends SettingsPreferenceFragment } private void assignDefaultPhoto(UserInfo user) { - Bitmap bitmap = UserIcons.convertToBitmap(UserIcons.getDefaultUserIcon(user.id, - /* light= */ false)); + Bitmap bitmap = Utils.getDefaultUserIconAsBitmap(user.id); mUserManager.setUserIcon(user.id, bitmap); } private Drawable getEncircledDefaultIcon() { if (mDefaultIconDrawable == null) { - mDefaultIconDrawable = encircle(UserIcons.convertToBitmap( - UserIcons.getDefaultUserIcon(UserHandle.USER_NULL, /* light= */ false))); + mDefaultIconDrawable = encircle(Utils.getDefaultUserIconAsBitmap(UserHandle.USER_NULL)); } return mDefaultIconDrawable; } |