summaryrefslogtreecommitdiff
path: root/src/com/android
diff options
context:
space:
mode:
authorKunhung Li <kunhungli@google.com>2021-04-29 20:17:33 +0800
committerKunhung Li <kunhungli@google.com>2021-05-01 15:30:39 +0800
commit150df00bacf65322584cff43763b9fbddd85d5c5 (patch)
treee325bc1ffe2a0a14e65c9add222eb15cafa3bb43 /src/com/android
parent3aaed1278c039f79749f059e4f68f29bfe03dedc (diff)
downloadThemePicker-150df00bacf65322584cff43763b9fbddd85d5c5.tar.gz
Add color logging function
- logColorApplied() Bug: 186193935 Test: build & statsd_testdrive 179 Change-Id: I650d9f836b4c40fecc2f82d03ff0d01777fb421b
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/customization/module/StatsLogUserEventLogger.java8
-rw-r--r--src/com/android/customization/module/ThemesUserEventLogger.java8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/customization/module/StatsLogUserEventLogger.java b/src/com/android/customization/module/StatsLogUserEventLogger.java
index 0270c012..fecf19b2 100644
--- a/src/com/android/customization/module/StatsLogUserEventLogger.java
+++ b/src/com/android/customization/module/StatsLogUserEventLogger.java
@@ -149,6 +149,14 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them
}
@Override
+ public void logColorApplied(int action, int colorIndex) {
+ SysUiStatsLog.write(STYLE_UI_CHANGED, action,
+ 0, 0, 0, 0, 0, 0, 0,
+ colorIndex,
+ 0, 0, 0);
+ }
+
+ @Override
public void logClockSelected(Clockface clock) {
SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT,
0, 0, 0,
diff --git a/src/com/android/customization/module/ThemesUserEventLogger.java b/src/com/android/customization/module/ThemesUserEventLogger.java
index cacbc641..ae262902 100644
--- a/src/com/android/customization/module/ThemesUserEventLogger.java
+++ b/src/com/android/customization/module/ThemesUserEventLogger.java
@@ -29,6 +29,14 @@ public interface ThemesUserEventLogger extends UserEventLogger {
void logThemeApplied(ThemeBundle theme, boolean isCustomTheme);
+ /**
+ * Logs the color usage while color is applied.
+ *
+ * @param action color applied action.
+ * @param colorIndex color applied index.
+ */
+ void logColorApplied(int action, int colorIndex);
+
void logClockSelected(Clockface clock);
void logClockApplied(Clockface clock);