Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types. Bug: 315731527 Fixes: 326664798 Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD Test: Manual, unit tests to follow Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
This commit is contained in:
@@ -361,17 +361,10 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
}
|
||||
|
||||
if (!removedPackages.isEmpty() || !removedComponents.isEmpty()) {
|
||||
// This predicate is used to mark an ItemInfo for removal if its package or component
|
||||
// is marked for removal.
|
||||
Predicate<ItemInfo> removeAppMatch =
|
||||
Predicate<ItemInfo> removeMatch =
|
||||
ItemInfoMatcher.ofPackages(removedPackages, mUser)
|
||||
.or(ItemInfoMatcher.ofComponents(removedComponents, mUser))
|
||||
.and(ItemInfoMatcher.ofItemIds(forceKeepShortcuts).negate());
|
||||
// This predicate is used to mark an app pair for removal if it contains an app marked
|
||||
// for removal.
|
||||
Predicate<ItemInfo> removeAppPairMatch =
|
||||
ItemInfoMatcher.forAppPairMatch(removeAppMatch);
|
||||
Predicate<ItemInfo> removeMatch = removeAppMatch.or(removeAppPairMatch);
|
||||
deleteAndBindComponentsRemoved(removeMatch,
|
||||
"removed because the corresponding package or component is removed. "
|
||||
+ "mOp=" + mOp + " removedPackages=" + removedPackages.stream().collect(
|
||||
|
||||
Reference in New Issue
Block a user