diff options
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java b/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java index 2f4b2efeec7f..4b141e7bed25 100644 --- a/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java +++ b/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java @@ -220,6 +220,16 @@ public class ZenMode implements Parcelable { return getTriggerDescription(); } + /** + * Returns an icon "key" that is guaranteed to be different if the icon is different. Note that + * the inverse is not true, i.e. two keys can be different and the icon still be visually the + * same. + */ + @NonNull + public String getIconKey() { + return mRule.getType() + ":" + mRule.getPackageName() + ":" + mRule.getIconResId(); + } + @NonNull public ListenableFuture<Drawable> getIcon(@NonNull Context context, @NonNull ZenIconLoader iconLoader) { |