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

Commit cc7e1e5e authored by Matías Hernández's avatar Matías Hernández Committed by Android (Google) Code Review
Browse files

Merge "Add an "icon key" to ZenMode" into main

parents 93e6471c aeadd415
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -220,6 +220,16 @@ public class ZenMode implements Parcelable {
        return getTriggerDescription();
        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
    @NonNull
    public ListenableFuture<Drawable> getIcon(@NonNull Context context,
    public ListenableFuture<Drawable> getIcon(@NonNull Context context,
            @NonNull ZenIconLoader iconLoader) {
            @NonNull ZenIconLoader iconLoader) {