Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6f240bc authored by Thiru Ramasamy's avatar Thiru Ramasamy Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: If40731963001b85a16505ad162e52aad2a971154
parents 58e3a767 640fc8b8
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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));
    }
+7 −1
Original line number Diff line number Diff line
@@ -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