diff options
author | Kunhung Li <kunhungli@google.com> | 2022-02-19 22:09:00 +0800 |
---|---|---|
committer | Kunhung Li <kunhungli@google.com> | 2022-04-01 20:48:53 +0800 |
commit | 62b60a16dd38c2f2cd86b44471d0afaec0277b38 (patch) | |
tree | 49d5f7df21bd3c06adcfe56e829b30504fb071da /src/com/android | |
parent | bdf34222091e3c93da462bbe1ba4d4dbcb17d9d8 (diff) | |
download | ThemePicker-62b60a16dd38c2f2cd86b44471d0afaec0277b38.tar.gz |
Refactor getCollectionIdHashCode()
Rename it to getIdHashCode() to let it be used for both collection id
and wallpaper id.
Bug: 220088526
Test: manual
Change-Id: I5e42c117b0585b744579297464881e308bde763d
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/customization/module/StatsLogUserEventLogger.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/com/android/customization/module/StatsLogUserEventLogger.java b/src/com/android/customization/module/StatsLogUserEventLogger.java index 667483e2..3aa5f9ef 100644 --- a/src/com/android/customization/module/StatsLogUserEventLogger.java +++ b/src/com/android/customization/module/StatsLogUserEventLogger.java @@ -80,20 +80,20 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them @Override public void logActionClicked(String collectionId, int actionLabelResId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_EXPLORE, 0, 0, 0, 0, 0, - getCollectionIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0); + getIdHashCode(collectionId), 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, - getCollectionIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0); + getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0); } @Override public void logCategorySelected(String collectionId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_OPEN_CATEGORY, 0, 0, 0, 0, 0, - getCollectionIdHashCode(collectionId), + getIdHashCode(collectionId), 0, 0, 0, 0, 0, 0, 0); } @@ -101,8 +101,8 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them public void logLiveWallpaperInfoSelected(String collectionId, @Nullable String wallpaperId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.LIVE_WALLPAPER_INFO_SELECT, 0, 0, 0, 0, 0, - getCollectionIdHashCode(collectionId), - wallpaperId != null ? wallpaperId.hashCode() : 0, + getIdHashCode(collectionId), + getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, 0); } @@ -111,8 +111,8 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them @Nullable String wallpaperId) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.LIVE_WALLPAPER_CUSTOMIZE_SELECT, 0, 0, 0, 0, 0, - getCollectionIdHashCode(collectionId), - wallpaperId != null ? wallpaperId.hashCode() : 0, + getIdHashCode(collectionId), + getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, 0); } @@ -121,8 +121,8 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them @Nullable String effects) { SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_APPLIED, 0, 0, 0, 0, 0, - getCollectionIdHashCode(collectionId), - wallpaperId != null ? wallpaperId.hashCode() : 0, + getIdHashCode(collectionId), + getIdHashCode(wallpaperId), 0, 0, 0, 0, 0, effects != null ? effects.hashCode() : 0); } @@ -225,7 +225,7 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them } } - private int getCollectionIdHashCode(String collectionId) { - return collectionId != null ? collectionId.hashCode() : 0; + private int getIdHashCode(String id) { + return id != null ? id.hashCode() : 0; } } |