Rename "badges" to "dots" where appropriate

This will reduce confusion with the other "badging" concept we use for,
e.g. work profiles. It is also consistent with the external name
"notification dots".

Change-Id: I2a2c9d96dc0d6284eb0c48adc78a856271caad4d
This commit is contained in:
Tony Wickham
2018-12-03 18:11:39 -08:00
parent de78d7ca78
commit f34bee819c
111 changed files with 685 additions and 687 deletions

View File

@@ -63,7 +63,7 @@ import com.android.launcher3.accessibility.AccessibleDragListenerAdapter;
import com.android.launcher3.accessibility.WorkspaceAccessibilityHelper;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.badge.FolderBadgeInfo;
import com.android.launcher3.dot.FolderDotInfo;
import com.android.launcher3.compat.AppWidgetManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragController;
@@ -3168,7 +3168,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
});
}
public void updateIconBadges(final Set<PackageUserKey> updatedBadges) {
public void updateNotificationDots(final Set<PackageUserKey> updatedDots) {
final PackageUserKey packageUserKey = new PackageUserKey(null, null);
final IntSet folderIds = new IntSet();
mapOverItems(MAP_RECURSE, new ItemOperator() {
@@ -3176,8 +3176,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
public boolean evaluate(ItemInfo info, View v) {
if (info instanceof ShortcutInfo && v instanceof BubbleTextView
&& packageUserKey.updateFromItemInfo(info)) {
if (updatedBadges.contains(packageUserKey)) {
((BubbleTextView) v).applyBadgeState(info, true /* animate */);
if (updatedDots.contains(packageUserKey)) {
((BubbleTextView) v).applyDotState(info, true /* animate */);
folderIds.add(info.container);
}
}
@@ -3192,11 +3192,11 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
public boolean evaluate(ItemInfo info, View v) {
if (info instanceof FolderInfo && folderIds.contains(info.id)
&& v instanceof FolderIcon) {
FolderBadgeInfo folderBadgeInfo = new FolderBadgeInfo();
FolderDotInfo folderDotInfo = new FolderDotInfo();
for (ShortcutInfo si : ((FolderInfo) info).contents) {
folderBadgeInfo.addBadgeInfo(mLauncher.getBadgeInfoForItem(si));
folderDotInfo.addDotInfo(mLauncher.getDotInfoForItem(si));
}
((FolderIcon) v).setBadgeInfo(folderBadgeInfo);
((FolderIcon) v).setDotInfo(folderDotInfo);
}
// process all the shortcuts
return false;