Add UI updates for incremental app installs.

1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Fixes: 176901235,176992421,176884453

Test: manual
Change-Id: Ie0575dc56c33c5d6ecd6c5cbf00666b96d6dcb16
This commit is contained in:
Schneider Victor-tulias
2021-01-12 11:40:27 -08:00
parent 6a5f431a7b
commit b803f7e2cb
4 changed files with 14 additions and 6 deletions

View File

@@ -129,7 +129,9 @@ public abstract class ItemInfoWithIcon extends ItemInfo {
protected ItemInfoWithIcon(ItemInfoWithIcon info) {
super(info);
bitmap = info.bitmap;
mProgressLevel = info.mProgressLevel;
runtimeStatusFlags = info.runtimeStatusFlags;
user = info.user;
}
@Override
@@ -195,8 +197,8 @@ public abstract class ItemInfoWithIcon extends ItemInfo {
: runtimeStatusFlags & ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE;
} else {
mProgressLevel = status == PackageInstallInfo.STATUS_INSTALLED ? 100 : 0;
runtimeStatusFlags = runtimeStatusFlags & ~FLAG_INSTALL_SESSION_ACTIVE;
runtimeStatusFlags = runtimeStatusFlags & ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE;
runtimeStatusFlags &= ~FLAG_INSTALL_SESSION_ACTIVE;
runtimeStatusFlags &= ~FLAG_INCREMENTAL_DOWNLOAD_ACTIVE;
}
}