mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +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.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
@@ -72,9 +71,8 @@ public class PackageInstallStateChangedTask extends BaseModelUpdateTask {
|
||||
synchronized (dataModel) {
|
||||
final HashSet<ItemInfo> updates = new HashSet<>();
|
||||
dataModel.forAllWorkspaceItemInfos(mInstallInfo.user, si -> {
|
||||
Intent intent = si.getIntent();
|
||||
if (si.hasPromiseIconUi() && (intent != null)
|
||||
&& mInstallInfo.packageName.equals(intent.getPackage())) {
|
||||
if (si.hasPromiseIconUi()
|
||||
&& mInstallInfo.packageName.equals(si.getTargetPackage())) {
|
||||
int installProgress = mInstallInfo.progress;
|
||||
|
||||
si.setProgressLevel(installProgress, PackageInstallInfo.STATUS_INSTALLING);
|
||||
|
||||
Reference in New Issue
Block a user