Switch to using system-wide default user icons
User icons were either User Settings specific, or missing. This makes it consistent with the ones in the new helper class. Bug: 17311038 Change-Id: I20cc1deba989cf7a397c5a8dba41bd91bd62472b
This commit is contained in:
@@ -31,6 +31,7 @@ import android.widget.ImageView;
|
||||
import android.widget.SpinnerAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.internal.util.UserIcons;
|
||||
import com.android.settings.drawable.CircleFramedDrawable;
|
||||
import com.android.settings.R;
|
||||
|
||||
@@ -57,7 +58,11 @@ public class UserSpinnerAdapter implements SpinnerAdapter {
|
||||
} else {
|
||||
name = userInfo.name;
|
||||
Bitmap bitmap = um.getUserIcon(userHandle.getIdentifier());
|
||||
icon = (bitmap == null) ? null : CircleFramedDrawable.getInstance(context, bitmap);
|
||||
if (bitmap != null) {
|
||||
icon = CircleFramedDrawable.getInstance(context, bitmap);
|
||||
} else {
|
||||
icon = UserIcons.getDefaultUserIcon(userInfo.id, /* light= */ false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user