mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Fix incremental download progress of workspaceiteminfos.
WorkspaceItemInfo intent package names could be null, while the item info itself had a non-null package name. Added a helper method checking component package names first, then intent package names as a fallback for deep shortcuts. Demo: https://drive.google.com/file/d/1No44OD7SAD9qdmu-O6g3WaGdFjFLu2in/view?usp=sharing Fixes: 181261930 Test: Manually on device Change-Id: Ie2e10a79865b4898038fbdd4bbd9a7e9e1d42366
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.UserHandle;
|
||||
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
@@ -66,8 +65,7 @@ public class PackageIncrementalDownloadUpdatedTask extends BaseModelUpdateTask {
|
||||
final ArrayList<WorkspaceItemInfo> updatedWorkspaceItems = new ArrayList<>();
|
||||
synchronized (dataModel) {
|
||||
dataModel.forAllWorkspaceItemInfos(mUser, si -> {
|
||||
Intent intent = si.getIntent();
|
||||
if ((intent != null) && mPackageName.equals(intent.getPackage())) {
|
||||
if (mPackageName.equals(si.getTargetPackage())) {
|
||||
si.runtimeStatusFlags &= ~ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE;
|
||||
si.setProgressLevel(downloadInfo);
|
||||
updatedWorkspaceItems.add(si);
|
||||
|
||||
Reference in New Issue
Block a user