diff options
author | Amith Yamasani <yamasani@google.com> | 2014-08-13 20:10:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-13 16:52:03 +0000 |
commit | 561d6bc9bb3f1473ac67f4bef5edac7b3046a901 (patch) | |
tree | 599aa9dd8cb370c9cd9f656c44a1c4add07e397b /src | |
parent | d6d0cd53d00a84619f3f90761ee3907732fac898 (diff) | |
parent | f2663abe1da11107104162a098482f34bb9fea03 (diff) | |
download | packages_apps_Settings-561d6bc9bb3f1473ac67f4bef5edac7b3046a901.zip packages_apps_Settings-561d6bc9bb3f1473ac67f4bef5edac7b3046a901.tar.gz packages_apps_Settings-561d6bc9bb3f1473ac67f4bef5edac7b3046a901.tar.bz2 |
Merge "Allow creating last user even if a guest exists." into lmp-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/users/UserSettings.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java index 93f9b0f..9ad34a9 100644 --- a/src/com/android/settings/users/UserSettings.java +++ b/src/com/android/settings/users/UserSettings.java @@ -790,6 +790,8 @@ public class UserSettings extends SettingsPreferenceFragment } else { setPhotoId(pref, user); } + } else { + pref.setIcon(getEncircledDefaultAvatar()); } } @@ -833,7 +835,7 @@ public class UserSettings extends SettingsPreferenceFragment if (missingIcons.size() > 0) { loadIconsAsync(missingIcons); } - boolean moreUsers = mUserManager.getMaxSupportedUsers() > users.size(); + boolean moreUsers = mUserManager.canAddMoreUsers(); mAddUser.setEnabled(moreUsers); } @@ -849,6 +851,9 @@ public class UserSettings extends SettingsPreferenceFragment protected Void doInBackground(List<Integer>... values) { for (int userId : values[0]) { Bitmap bitmap = mUserManager.getUserIcon(userId); + if (bitmap == null) { + bitmap = createBitmapFromDrawable(R.drawable.ic_avatar_default_1); + } mUserIcons.append(userId, bitmap); } return null; |