Loading src/com/android/customization/model/color/ColorSectionController.java +1 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class ColorSectionController implements CustomizationSectionController<Co public void onSuccess() { mColorSectionView.announceForAccessibility( mColorSectionView.getContext().getString(R.string.color_changed)); mEventLogger.logColorApplied(getColorAction(colorOption), colorOption.getIndex()); mEventLogger.logColorApplied(getColorAction(colorOption), colorOption); } @Override Loading src/com/android/customization/module/StatsLogUserEventLogger.java +22 −20 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.text.TextUtils; import androidx.annotation.Nullable; import com.android.customization.model.clock.Clockface; import com.android.customization.model.color.ColorOption; import com.android.customization.model.grid.GridOption; import com.android.customization.model.theme.ThemeBundle; import com.android.systemui.shared.system.SysUiStatsLog; Loading Loading @@ -79,31 +80,31 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them public void logAppLaunched(Intent launchSource) { SysUiStatsLog.write(STYLE_UI_CHANGED, STYLE_UICHANGED__ACTION__APP_LAUNCHED, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getAppLaunchSource(launchSource), 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0); } @Override public void logResumed(boolean provisioned, boolean wallpaper) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.ONRESUME, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logStopped() { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.ONSTOP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logActionClicked(String collectionId, int actionLabelResId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_EXPLORE, 0, 0, 0, 0, 0, getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logIndividualWallpaperSelected(String collectionId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_SELECT, 0, 0, 0, 0, 0, getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -111,7 +112,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_OPEN_CATEGORY, 0, 0, 0, 0, 0, getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -120,7 +121,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them 0, 0, 0, 0, 0, getIdHashCode(collectionId), getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -130,7 +131,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them 0, 0, 0, 0, 0, getIdHashCode(collectionId), getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -154,7 +155,8 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them getIdHashCode(lockWallpaperId), mPreferences.getFirstLaunchDateSinceSetup(), mPreferences.getFirstWallpaperApplyDateSinceSetup(), mPreferences.getAppLaunchCount()); mPreferences.getAppLaunchCount(), 0); } @Override Loading @@ -165,14 +167,14 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them getIdHashCode(collectionId), getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, effects != null ? effects.hashCode() : 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0); } @Override public void logEffectApply(String effect, @EffectStatus int status) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_EFFECT_APPLIED, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, status, effect != null ? effect.hashCode() : 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0); } @Nullable Loading @@ -187,7 +189,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -196,15 +198,15 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logColorApplied(int action, int colorIndex) { public void logColorApplied(int action, ColorOption colorOption) { SysUiStatsLog.write(STYLE_UI_CHANGED, action, 0, 0, 0, 0, 0, 0, 0, colorIndex, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); colorOption.getIndex(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, colorOption.getStyle().ordinal() + 1); } @Override Loading @@ -212,7 +214,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT, 0, 0, 0, Objects.hashCode(clock.getId()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -220,7 +222,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_APPLIED, 0, 0, 0, Objects.hashCode(clock.getId()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -228,7 +230,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT, 0, 0, 0, 0, grid.cols, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -236,7 +238,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_APPLIED, 0, 0, 0, 0, grid.cols, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } private int getAppLaunchSource(Intent launchSource) { Loading src/com/android/customization/module/ThemesUserEventLogger.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.customization.module; import com.android.customization.model.clock.Clockface; import com.android.customization.model.color.ColorOption; import com.android.customization.model.grid.GridOption; import com.android.customization.model.theme.ThemeBundle; import com.android.wallpaper.module.UserEventLogger; Loading @@ -33,9 +34,9 @@ public interface ThemesUserEventLogger extends UserEventLogger { * Logs the color usage while color is applied. * * @param action color applied action. * @param colorIndex color applied index. * @param colorOption applied color option. */ void logColorApplied(int action, int colorIndex); void logColorApplied(int action, ColorOption colorOption); void logClockSelected(Clockface clock); Loading tests/src/com/android/customization/testing/TestThemesUserEventLogger.java +2 −1 Original line number Diff line number Diff line package com.android.customization.testing; import com.android.customization.model.clock.Clockface; import com.android.customization.model.color.ColorOption; import com.android.customization.model.grid.GridOption; import com.android.customization.model.theme.ThemeBundle; import com.android.customization.module.ThemesUserEventLogger; Loading @@ -22,7 +23,7 @@ public class TestThemesUserEventLogger extends TestUserEventLogger } @Override public void logColorApplied(int action, int colorIndex) { public void logColorApplied(int action, ColorOption colorOption) { // Do nothing. } Loading Loading
src/com/android/customization/model/color/ColorSectionController.java +1 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class ColorSectionController implements CustomizationSectionController<Co public void onSuccess() { mColorSectionView.announceForAccessibility( mColorSectionView.getContext().getString(R.string.color_changed)); mEventLogger.logColorApplied(getColorAction(colorOption), colorOption.getIndex()); mEventLogger.logColorApplied(getColorAction(colorOption), colorOption); } @Override Loading
src/com/android/customization/module/StatsLogUserEventLogger.java +22 −20 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.text.TextUtils; import androidx.annotation.Nullable; import com.android.customization.model.clock.Clockface; import com.android.customization.model.color.ColorOption; import com.android.customization.model.grid.GridOption; import com.android.customization.model.theme.ThemeBundle; import com.android.systemui.shared.system.SysUiStatsLog; Loading Loading @@ -79,31 +80,31 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them public void logAppLaunched(Intent launchSource) { SysUiStatsLog.write(STYLE_UI_CHANGED, STYLE_UICHANGED__ACTION__APP_LAUNCHED, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getAppLaunchSource(launchSource), 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0); } @Override public void logResumed(boolean provisioned, boolean wallpaper) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.ONRESUME, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logStopped() { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.ONSTOP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logActionClicked(String collectionId, int actionLabelResId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_EXPLORE, 0, 0, 0, 0, 0, getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logIndividualWallpaperSelected(String collectionId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_SELECT, 0, 0, 0, 0, 0, getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -111,7 +112,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_OPEN_CATEGORY, 0, 0, 0, 0, 0, getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -120,7 +121,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them 0, 0, 0, 0, 0, getIdHashCode(collectionId), getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -130,7 +131,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them 0, 0, 0, 0, 0, getIdHashCode(collectionId), getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -154,7 +155,8 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them getIdHashCode(lockWallpaperId), mPreferences.getFirstLaunchDateSinceSetup(), mPreferences.getFirstWallpaperApplyDateSinceSetup(), mPreferences.getAppLaunchCount()); mPreferences.getAppLaunchCount(), 0); } @Override Loading @@ -165,14 +167,14 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them getIdHashCode(collectionId), getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, effects != null ? effects.hashCode() : 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0); } @Override public void logEffectApply(String effect, @EffectStatus int status) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_EFFECT_APPLIED, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, status, effect != null ? effect.hashCode() : 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0); } @Nullable Loading @@ -187,7 +189,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -196,15 +198,15 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logColorApplied(int action, int colorIndex) { public void logColorApplied(int action, ColorOption colorOption) { SysUiStatsLog.write(STYLE_UI_CHANGED, action, 0, 0, 0, 0, 0, 0, 0, colorIndex, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); colorOption.getIndex(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, colorOption.getStyle().ordinal() + 1); } @Override Loading @@ -212,7 +214,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT, 0, 0, 0, Objects.hashCode(clock.getId()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -220,7 +222,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_APPLIED, 0, 0, 0, Objects.hashCode(clock.getId()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -228,7 +230,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_SELECT, 0, 0, 0, 0, grid.cols, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override Loading @@ -236,7 +238,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.PICKER_APPLIED, 0, 0, 0, 0, grid.cols, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } private int getAppLaunchSource(Intent launchSource) { Loading
src/com/android/customization/module/ThemesUserEventLogger.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.customization.module; import com.android.customization.model.clock.Clockface; import com.android.customization.model.color.ColorOption; import com.android.customization.model.grid.GridOption; import com.android.customization.model.theme.ThemeBundle; import com.android.wallpaper.module.UserEventLogger; Loading @@ -33,9 +34,9 @@ public interface ThemesUserEventLogger extends UserEventLogger { * Logs the color usage while color is applied. * * @param action color applied action. * @param colorIndex color applied index. * @param colorOption applied color option. */ void logColorApplied(int action, int colorIndex); void logColorApplied(int action, ColorOption colorOption); void logClockSelected(Clockface clock); Loading
tests/src/com/android/customization/testing/TestThemesUserEventLogger.java +2 −1 Original line number Diff line number Diff line package com.android.customization.testing; import com.android.customization.model.clock.Clockface; import com.android.customization.model.color.ColorOption; import com.android.customization.model.grid.GridOption; import com.android.customization.model.theme.ThemeBundle; import com.android.customization.module.ThemesUserEventLogger; Loading @@ -22,7 +23,7 @@ public class TestThemesUserEventLogger extends TestUserEventLogger } @Override public void logColorApplied(int action, int colorIndex) { public void logColorApplied(int action, ColorOption colorOption) { // Do nothing. } Loading