Merge "Tint the work icon." into oc-mr1-dev am: 260ec8b9ea
am: 270f217c9f
Change-Id: I918a29fb927ddb578933f64cc989b321e81376e0
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.deviceinfo.storage;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.UserInfo;
|
import android.content.pm.UserInfo;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.storage.VolumeInfo;
|
import android.os.storage.VolumeInfo;
|
||||||
@@ -126,7 +127,14 @@ public class UserProfileController extends AbstractPreferenceController implemen
|
|||||||
public void handleUserIcons(SparseArray<Drawable> fetchedIcons) {
|
public void handleUserIcons(SparseArray<Drawable> fetchedIcons) {
|
||||||
Drawable userIcon = fetchedIcons.get(mUser.id);
|
Drawable userIcon = fetchedIcons.get(mUser.id);
|
||||||
if (userIcon != null) {
|
if (userIcon != null) {
|
||||||
mStoragePreference.setIcon(userIcon);
|
mStoragePreference.setIcon(applyTint(mContext, userIcon));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Drawable applyTint(Context context, Drawable icon) {
|
||||||
|
icon = icon.mutate();
|
||||||
|
icon.setTint(Utils.getColorAttr(context, android.R.attr.colorControlNormal));
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user