// 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.data.object.assistant.rule; import android.content.ContentResolver; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.UUID; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; // Referenced classes of package com.olio.data.object.assistant.rule: // NotificationRule, Rule, RemindMeLaterRuleBuilder, ContextContainer public class RemindMeLaterRule extends NotificationRule { public static final String HOW_REMINDER = "reminder"; public static final String HOW_SMS_REPLY = "sms"; public static final String TYPE_NAME = com/olio/data/object/assistant/rule/RemindMeLaterRule.getSimpleName(); private static final long serialVersionUID = 0x8cff47c61f075a34L; private List how; private List reminderTriggerContext; public RemindMeLaterRule() { } public static List getAllRemindMeLaterRules(ContentResolver contentresolver) { contentresolver = Rule.getAllRules(contentresolver); ArrayList arraylist = new ArrayList(); contentresolver = contentresolver.iterator(); do { if (!contentresolver.hasNext()) { break; } Rule rule = (Rule)contentresolver.next(); if (rule instanceof RemindMeLaterRule) { arraylist.add((RemindMeLaterRule)rule); } } while (true); contentresolver = arraylist; if (arraylist.size() == 0) { contentresolver = getDefaultRules(); } return contentresolver; } private static List getDefaultRules() { return Arrays.asList(new RemindMeLaterRule[] { RemindMeLaterRuleBuilder.aRemindMeLaterRule().setCategories(Collections.singletonList("all")).setContext(Collections.singletonList(new ContextContainer("location", "home"))).setEnabled(true).setHow(Collections.singletonList("reminder")).setObjectId(UUID.randomUUID().toString()).setReminderTriggerContext(Arrays.asList(new ContextContainer[] { new ContextContainer("location", "work") })).build(), RemindMeLaterRuleBuilder.aRemindMeLaterRule().setCategories(Collections.singletonList("all")).setContext(Collections.singletonList(new ContextContainer("location", "work"))).setEnabled(true).setHow(Collections.singletonList("reminder")).setObjectId(UUID.randomUUID().toString()).setReminderTriggerContext(Arrays.asList(new ContextContainer[] { new ContextContainer("location", "home") })).build(), RemindMeLaterRuleBuilder.aRemindMeLaterRule().setCategories(Collections.singletonList("all")).setContext(Collections.singletonList(new ContextContainer("location", "unknown"))).setEnabled(true).setHow(Collections.singletonList("reminder")).setObjectId(UUID.randomUUID().toString()).setReminderTriggerContext(Arrays.asList(new ContextContainer[] { new ContextContainer("location", "home"), new ContextContainer("location", "work") })).build() }); } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } else { RemindMeLaterRule remindmelaterrule = (RemindMeLaterRule)obj; return (new EqualsBuilder()).appendSuper(super.equals(obj)).append(how, remindmelaterrule.how).isEquals(); } } public com.olio.olios.model.record.SerializedRecord.SerializedRecordObject getDefaultObject() { return new RemindMeLaterRule(); } public List getHow() { return how; } public List getReminderTriggerContext() { return reminderTriggerContext; } public int hashCode() { return (new HashCodeBuilder(17, 37)).appendSuper(super.hashCode()).append(how).toHashCode(); } public void setHow(List list) { how = list; } public void setReminderTriggerContext(List list) { reminderTriggerContext = list; } }