Moving some utility methods around

Change-Id: I8abca49a0dbf656212b21e0552502036a1619164
This commit is contained in:
Sunny Goyal
2019-01-31 16:05:58 -08:00
parent 9018627d05
commit aae6fbb903
8 changed files with 38 additions and 50 deletions
@@ -31,6 +31,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Predicate;
/**
* A utility class to maintain the collection of all apps.
@@ -122,11 +123,11 @@ public class AllAppsStore {
mIconContainers.remove(container);
}
public void updateNotificationDots(Set<PackageUserKey> updatedDots) {
public void updateNotificationDots(Predicate<PackageUserKey> updatedDots) {
updateAllIcons((child) -> {
if (child.getTag() instanceof ItemInfo) {
ItemInfo info = (ItemInfo) child.getTag();
if (mTempKey.updateFromItemInfo(info) && updatedDots.contains(mTempKey)) {
if (mTempKey.updateFromItemInfo(info) && updatedDots.test(mTempKey)) {
child.applyDotState(info, true /* animate */);
}
}