Moving various application into related methods to a separate class

> This avoids duplicate RPCs when trying to get multiple properties
  from AppInfo
> This would be used in a followup cl when AppInfo is added to caching
  logic in IconCache

Bug: 366237794
Test: atest ApplicationInfoWrapperTest
Flag: EXEMPT refactor
Change-Id: I55b964d4f8cfa1ff1770e310ac278719495e285d
This commit is contained in:
Sunny Goyal
2024-09-23 01:05:13 -07:00
parent d3460af469
commit 28d6bbd6b4
22 changed files with 432 additions and 429 deletions
@@ -41,6 +41,7 @@ import com.android.launcher3.model.data.WorkspaceItemFactory;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.pm.InstallSessionHelper;
import com.android.launcher3.pm.PackageInstallInfo;
import com.android.launcher3.util.ApplicationInfoWrapper;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.PackageManagerHelper;
@@ -103,8 +104,8 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask {
}
// b/139663018 Short-circuit this logic if the icon is a system app
if (PackageManagerHelper.isSystemApp(context,
Objects.requireNonNull(item.getIntent()))) {
if (new ApplicationInfoWrapper(context,
Objects.requireNonNull(item.getIntent())).isSystem()) {
continue;
}