Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5b1215a authored by Charlie Anderson's avatar Charlie Anderson Committed by Android (Google) Code Review
Browse files

Merge "Add additional unit tests for WorkspaceItemProcessor to cover shortcuts...

Merge "Add additional unit tests for WorkspaceItemProcessor to cover shortcuts and folders. Also cleanup the test suite." into main
parents 3a42f0e0 887f49e2
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ class WorkspaceItemProcessor(
                            }
                        }
                    }
                    pmHelper.isAppOnSdcard(targetPkg!!, c.user) -> {
                    pmHelper.isAppOnSdcard(targetPkg, c.user) -> {
                        // Package is present but not available.
                        disabledState =
                            disabledState or WorkspaceItemInfo.FLAG_DISABLED_NOT_AVAILABLE
@@ -278,7 +278,7 @@ class WorkspaceItemProcessor(
                info = c.loadSimpleWorkspaceItem()

                // Shortcuts are only available on the primary profile
                if (!TextUtils.isEmpty(targetPkg) && pmHelper.isAppSuspended(targetPkg!!, c.user)) {
                if (!TextUtils.isEmpty(targetPkg) && pmHelper.isAppSuspended(targetPkg, c.user)) {
                    disabledState = disabledState or ItemInfoWithIcon.FLAG_DISABLED_SUSPENDED
                }
                info.options = c.options
@@ -333,13 +333,12 @@ class WorkspaceItemProcessor(
                        info.runtimeStatusFlags and
                            ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE.inv()
                } else if (
                    activityInfo ==
                        null // For archived apps, include progress info in case there is
                    // a pending install session post restart of device.
                    ||
                    activityInfo == null ||
                        (Utilities.enableSupportForArchiving() &&
                            activityInfo.applicationInfo.isArchived)
                ) {
                    // For archived apps, include progress info in case there is
                    // a pending install session post restart of device.
                    val installProgress = (si.getProgress() * 100).toInt()
                    info.setProgressLevel(installProgress, PackageInstallInfo.STATUS_INSTALLING)
                }
+288 −155

File changed.

Preview size limit exceeded, changes collapsed.