mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Add logging to help debug invalid icon state and UI.
PackageInstallStateChangedTask had some redundant state handling that could lead to invalid states. Removed state handling (potential fix to b/198924992) along with logging to help debug b/198924992.
Test: Started and canceled an app download
Bug: 198924992
Change-Id: I8b8202ceb62a3265186d8d46a0e1be6afc83c080
(cherry picked from commit fbf4178ab7)
This commit is contained in:
@@ -24,6 +24,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.icons.BitmapInfo;
|
||||
import com.android.launcher3.icons.FastBitmapDrawable;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.pm.PackageInstallInfo;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
|
||||
@@ -179,6 +180,12 @@ public abstract class ItemInfoWithIcon extends ItemInfo {
|
||||
*/
|
||||
public void setProgressLevel(PackageInstallInfo installInfo) {
|
||||
setProgressLevel(installInfo.progress, installInfo.state);
|
||||
|
||||
if (installInfo.state == PackageInstallInfo.STATUS_FAILED) {
|
||||
FileLog.d(TAG,
|
||||
"Icon info: " + this + " marked broken with install info: " + installInfo,
|
||||
new Exception());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user