Merge "Enable logging for 'Themed icons' setting." into sc-dev am: 640fc8b84d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14983277

Change-Id: I06a98f6434e448dad971319fcf6d9ec4bb7b8743
This commit is contained in:
Thiru Ramasamy
2021-06-15 21:16:22 +00:00
committed by Automerger Merge Worker
2 changed files with 18 additions and 1 deletions
@@ -27,8 +27,11 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_SCREEN_SUGGESTIONS_ENABLED;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_NOTIFICATION_DOT_DISABLED;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_NOTIFICATION_DOT_ENABLED;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_THEMED_ICON_DISABLED;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_THEMED_ICON_ENABLED;
import static com.android.launcher3.model.QuickstepModelDelegate.LAST_PREDICTION_ENABLED_STATE;
import static com.android.launcher3.util.SettingsCache.NOTIFICATION_BADGING_URI;
import static com.android.launcher3.util.Themes.KEY_THEMED_ICONS;
import android.content.Context;
import android.content.SharedPreferences;
@@ -40,6 +43,7 @@ import android.util.Xml;
import com.android.launcher3.AutoInstallsLayout;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.InstanceIdSequence;
import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.logging.StatsLogManager.StatsLogger;
@@ -170,6 +174,13 @@ public class SettingsChangeLogger implements
if (gridSizeChangedEvent != null) {
logger.log(gridSizeChangedEvent);
}
if (FeatureFlags.ENABLE_THEMED_ICONS.get()) {
logger.log(prefs.getBoolean(KEY_THEMED_ICONS, false)
? LAUNCHER_THEMED_ICON_ENABLED
: LAUNCHER_THEMED_ICON_DISABLED);
}
mLoggablePrefs.forEach((key, lp) -> logger.log(() ->
prefs.getBoolean(key, lp.defaultValue) ? lp.eventIdOn : lp.eventIdOff));
}
@@ -473,7 +473,13 @@ public class StatsLogManager implements ResourceBasedOverride {
LAUNCHER_WIDGET_RESIZE_COMPLETED(824),
@UiEvent(doc = "User reconfigured a widget on their home screen.")
LAUNCHER_WIDGET_RECONFIGURED(821)
LAUNCHER_WIDGET_RECONFIGURED(821),
@UiEvent(doc = "User enabled themed icons option in wallpaper & style settings.")
LAUNCHER_THEMED_ICON_ENABLED(836),
@UiEvent(doc = "User disabled themed icons option in wallpaper & style settings.")
LAUNCHER_THEMED_ICON_DISABLED(837)
;
// ADD MORE