Folder Previews Show Grey Pending Icon

When downloading an app previously the pending icon would show the full color icon when it was in a folder preview. To fix, we consolidated the logic for pending icons in PreloadIconDrawable and moved the logic of the pending state to the ItemInfoWithIcon model to represent the state of a pending application inside the model instead of in views.

Bug: b/324629535
Test: ItemInfoWithIconTest.kt
Flag: None
Change-Id: I4ffab44ddead046adcc84911039c87ea7c304e63
This commit is contained in:
Andrew Cole
2024-02-16 14:34:45 -08:00
parent 6a0c468563
commit d462190ef2
5 changed files with 125 additions and 42 deletions
@@ -173,6 +173,8 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
mIconScaleMultiplier.updateValue(info.getProgressLevel() == 0 ? 0 : 1);
setLevel(info.getProgressLevel());
// Set a disabled icon color if the app is suspended or if the app is pending download
setIsDisabled(info.isDisabled() || info.isPendingDownload());
}
@Override