// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.communication.notifications.mappers.rule; import android.content.Context; import com.olio.communication.notifications.new_notifications.StreamItem; import com.olio.communication.notifications.new_notifications.StreamItemBuilder; import com.olio.data.object.assistant.rule.SilenceNotificationsRule; import com.olio.util.ALog; import java.util.Arrays; import java.util.List; // Referenced classes of package com.olio.communication.notifications.mappers.rule: // ContextualRuleMapper public abstract class NotificationCategoryContextualRuleMapper extends ContextualRuleMapper { public NotificationCategoryContextualRuleMapper(Context context, SilenceNotificationsRule silencenotificationsrule) { super(context, silencenotificationsrule); } protected abstract void categoryMatchedApplyRule(StreamItemBuilder streamitembuilder); protected void contextMatchedApplyRule(StreamItemBuilder streamitembuilder) { StreamItem streamitem = streamitembuilder.build(); ALog.d("Inside contextMatchedApplyRule", new Object[0]); if (streamitem == null) { ALog.d("cannot match context for rule. StreamItem null", new Object[0]); } else { if (((SilenceNotificationsRule)rule).getCategories() == null) { ALog.d("Rule categories are null", new Object[0]); } else { ALog.d("Categories are not null and they are: %s", new Object[] { Arrays.toString(((SilenceNotificationsRule)rule).getCategories().toArray()) }); } if (((SilenceNotificationsRule)rule).getCategories() != null && ((SilenceNotificationsRule)rule).getCategories().contains("all")) { ALog.d("Rule matched all notifications. Apply.", new Object[0]); categoryMatchedApplyRule(streamitembuilder); return; } if (((SilenceNotificationsRule)rule).getCategories() != null && streamitem.getNotificationCategory() != null && ((SilenceNotificationsRule)rule).getCategories().contains(streamitem.getNotificationCategory().toTag())) { ALog.d("Rule matched categories. Apply.", new Object[0]); categoryMatchedApplyRule(streamitembuilder); return; } } } public String toString() { return (new StringBuilder()).append("NotificationCategoryContextualRuleMapper{} ").append(super.toString()).toString(); } }