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 Bug: 171008815 Test: manual Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
This commit is contained in:
@@ -24,7 +24,6 @@ import android.view.ViewGroup;
|
||||
import com.android.launcher3.BubbleTextView;
|
||||
import com.android.launcher3.model.data.AppInfo;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.PromiseAppInfo;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
|
||||
@@ -145,10 +144,17 @@ public class AllAppsStore {
|
||||
});
|
||||
}
|
||||
|
||||
public void updatePromiseAppProgress(PromiseAppInfo app) {
|
||||
/**
|
||||
* Sets the AppInfo's associated icon's progress bar.
|
||||
*
|
||||
* If this app is installed and supports incremental downloads, the progress bar will be updated
|
||||
* the app's total download progress. Otherwise, the progress bar will be updated to the app's
|
||||
* installation progress.
|
||||
*/
|
||||
public void updateProgressBar(AppInfo app) {
|
||||
updateAllIcons((child) -> {
|
||||
if (child.getTag() == app) {
|
||||
child.applyProgressLevel(app.level);
|
||||
child.applyProgressLevel(app.getProgressLevel());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user