Add support for adding promise icons for new install sessions by user.

- Added flag PROMISE_APPS_NEW_INSTALLS
- Promise icons only added if flag (above) is on, as well as the setting
  for "Add icon to Home screen"
- Maintains a list of session ids of promise icons that have been added to the
  home screen, so that if the user manually removes the icon, we do not add
  it back to the home screen when the install is completed.
- Queues all applications as promise icons, and replaces with actual
  app info when its being added to the workspace.

Bug: 135633159
Change-Id: I411db59f9bd1b346d98b9bb73f5376a5983b8de5
This commit is contained in:
Jon Miranda
2019-08-19 13:32:09 -07:00
parent 6fe3eec95c
commit c84168df80
12 changed files with 258 additions and 91 deletions

View File

@@ -29,7 +29,8 @@ public class PackageInstallStateChangedTaskTest extends BaseModelUpdateTaskTestC
private PackageInstallStateChangedTask newTask(String pkg, int progress) {
int state = PackageInstallerCompat.STATUS_INSTALLING;
PackageInstallInfo installInfo = new PackageInstallInfo(pkg, state, progress);
PackageInstallInfo installInfo = new PackageInstallInfo(pkg, state, progress,
android.os.Process.myUserHandle());
return new PackageInstallStateChangedTask(installInfo);
}