mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Improve "isActiveArchive" check by moving it a bit earlier into the
method. Apply progress level doesn't need to be called unless the app is actively being unarchived. Previously this was fixed by adding a check directly in "setIsDisabled()" which is not quite the right place (we can exit earlier). Bug: 326218355 Test: manual Flag: ACONFIG com.android.launcher3.enable_support_for_archiving TRUNKFOOD Change-Id: Ia12013dbcec2d40413a6cf819f8d1787b815adc1
This commit is contained in:
@@ -160,10 +160,6 @@ public abstract class ItemInfoWithIcon extends ItemInfo {
|
||||
* and its install session is active
|
||||
*/
|
||||
public boolean isPendingDownload() {
|
||||
if (isArchived()) {
|
||||
return this.getProgressLevel() == 0
|
||||
&& (this.runtimeStatusFlags & FLAG_INSTALL_SESSION_ACTIVE) != 0;
|
||||
}
|
||||
return getProgressLevel() == 0;
|
||||
}
|
||||
|
||||
@@ -177,6 +173,11 @@ public abstract class ItemInfoWithIcon extends ItemInfo {
|
||||
return (runtimeStatusFlags & FLAG_ARCHIVED) != 0;
|
||||
}
|
||||
|
||||
/** Returns true if the app is archived and has an active install session. */
|
||||
public boolean isActiveArchive() {
|
||||
return isArchived() && (runtimeStatusFlags & FLAG_INSTALL_SESSION_ACTIVE) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether we're using a low res icon
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user