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
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 338c20b..182a4ee 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -50,7 +50,7 @@
private final IconCache mIconCache;
private final WidgetPreviewLoader mWidgetCache;
private final InvariantDeviceProfile mInvariantDeviceProfile;
- private final SecureSettingsObserver mNotificationBadgingObserver;
+ private final SecureSettingsObserver mNotificationDotsObserver;
public static LauncherAppState getInstance(final Context context) {
return INSTANCE.get(context);
@@ -98,19 +98,19 @@
UserManagerCompat.getInstance(mContext).enableAndResetCache();
mInvariantDeviceProfile.addOnChangeListener(this::onIdpChanged);
- if (!mContext.getResources().getBoolean(R.bool.notification_badging_enabled)) {
- mNotificationBadgingObserver = null;
+ if (!mContext.getResources().getBoolean(R.bool.notification_dots_enabled)) {
+ mNotificationDotsObserver = null;
} else {
- // Register an observer to rebind the notification listener when badging is re-enabled.
- mNotificationBadgingObserver =
+ // Register an observer to rebind the notification listener when dots are re-enabled.
+ mNotificationDotsObserver =
newNotificationSettingsObserver(mContext, this::onNotificationSettingsChanged);
- mNotificationBadgingObserver.register();
- mNotificationBadgingObserver.dispatchOnChange();
+ mNotificationDotsObserver.register();
+ mNotificationDotsObserver.dispatchOnChange();
}
}
- protected void onNotificationSettingsChanged(boolean isNotificationBadgingEnabled) {
- if (isNotificationBadgingEnabled) {
+ protected void onNotificationSettingsChanged(boolean areNotificationDotsEnabled) {
+ if (areNotificationDotsEnabled) {
NotificationListener.requestRebind(new ComponentName(
mContext, NotificationListener.class));
}
@@ -137,8 +137,8 @@
final LauncherAppsCompat launcherApps = LauncherAppsCompat.getInstance(mContext);
launcherApps.removeOnAppsChangedCallback(mModel);
PackageInstallerCompat.getInstance(mContext).onStop();
- if (mNotificationBadgingObserver != null) {
- mNotificationBadgingObserver.unregister();
+ if (mNotificationDotsObserver != null) {
+ mNotificationDotsObserver.unregister();
}
}