Use circular avatars wherever appropriate
Battery stats, Data usage and Running apps Change-Id: Ib7f851e55ef7e44f18d3f8a2cd27f5f2204b0145
This commit is contained in:
@@ -32,6 +32,7 @@ import android.content.pm.ServiceInfo;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.Drawable.ConstantState;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.Looper;
|
||||
@@ -671,7 +672,12 @@ public class RunningState {
|
||||
return super.loadIcon(context, state);
|
||||
}
|
||||
if (mUser.mIcon != null) {
|
||||
return mUser.mIcon.getConstantState().newDrawable();
|
||||
ConstantState constState = mUser.mIcon.getConstantState();
|
||||
if (constState == null) {
|
||||
return mUser.mIcon;
|
||||
} else {
|
||||
return constState.newDrawable();
|
||||
}
|
||||
}
|
||||
return context.getResources().getDrawable(
|
||||
com.android.internal.R.drawable.ic_menu_cc);
|
||||
@@ -831,8 +837,8 @@ public class RunningState {
|
||||
UserInfo info = mUm.getUserInfo(newItem.mUserId);
|
||||
userItem.mUser.mInfo = info;
|
||||
if (info != null) {
|
||||
userItem.mUser.mIcon = UserUtils.getUserIcon(mUm, info,
|
||||
context.getResources());
|
||||
userItem.mUser.mIcon = UserUtils.getUserIcon(context, mUm,
|
||||
info, context.getResources());
|
||||
}
|
||||
String name = info != null ? info.name : null;
|
||||
if (name == null) {
|
||||
|
Reference in New Issue
Block a user