Add support for progress bar during unarchival of app.
* With this change, progress bar should appear whenever app update for archived app reaches non-zero progress. * Once the update is cancelled, the progress bar should also disappear. Test: PromiseIconUiTest and manually tested the progress bar using Play Store Bug: 302115555 Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT Change-Id: Iacf7a0fd865dba34915fa09f59c63a1da6e47315
This commit is contained in:
1 parent
97eee72e6e
commit
2e6010c421
14 files changed
+174
-12
No files matched your search
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.launcher3.pm;
|
||||
|
||||
import static com.android.launcher3.Flags.enableSupportForArchiving;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.LauncherApps;
|
||||
@@ -51,6 +53,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* Utility class to tracking install sessions
|
||||
*/
|
||||
@SuppressWarnings("NewApi")
|
||||
public class InstallSessionHelper {
|
||||
|
||||
@NonNull
|
||||
@@ -227,6 +230,11 @@ public class InstallSessionHelper {
|
||||
}
|
||||
|
||||
public boolean verifySessionInfo(@Nullable final PackageInstaller.SessionInfo sessionInfo) {
|
||||
// For archived apps we always want to show promise icons and the checks below don't apply.
|
||||
if (enableSupportForArchiving() && sessionInfo != null && sessionInfo.isUnarchival()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return verify(sessionInfo) != null
|
||||
&& sessionInfo.getInstallReason() == PackageManager.INSTALL_REASON_USER
|
||||
&& sessionInfo.getAppIcon() != null
|
||||
|
||||
Reference in new issue
Block a user