Fix user color overlay is not applied

Resource overlay is now done in runtime with non-system resources object.
Amend getDefaultUserIcon to take resources object as parameter.

BUG: 69355037
Test: Factory reset, verify that overlayed color is used in multiple
places, including keyguard, the bar under quick settings and Settings app.

Change-Id: I20b0527bdcb2eb38e8bea6a05f53eea1edcba932
This commit is contained in:
Tony Mak
2017-11-23 16:57:08 +08:00
parent 4769d2febc
commit 213955e562
6 changed files with 17 additions and 9 deletions

View File

@@ -2476,7 +2476,8 @@ public class ApplicationPackageManager extends PackageManager {
if (itemInfo.showUserIcon != UserHandle.USER_NULL) {
Bitmap bitmap = getUserManager().getUserIcon(itemInfo.showUserIcon);
if (bitmap == null) {
return UserIcons.getDefaultUserIcon(itemInfo.showUserIcon, /* light= */ false);
return UserIcons.getDefaultUserIcon(
mContext.getResources(), itemInfo.showUserIcon, /* light= */ false);
}
return new BitmapDrawable(bitmap);
}