1 package com.android.settings.notification.zen; 2 3 import android.annotation.Nullable; 4 import android.app.AutomaticZenRule; 5 import android.content.ComponentName; 6 import android.net.Uri; 7 8 public class ZenRuleInfo { 9 @Override equals(Object o)10 public boolean equals(Object o) { 11 if (this == o) return true; 12 if (o == null || getClass() != o.getClass()) return false; 13 14 ZenRuleInfo that = (ZenRuleInfo) o; 15 16 if (isSystem != that.isSystem) return false; 17 if (ruleInstanceLimit != that.ruleInstanceLimit) return false; 18 if (packageName != null ? !packageName.equals(that.packageName) : that.packageName != null) 19 return false; 20 if (title != null ? !title.equals(that.title) : that.title != null) return false; 21 if (settingsAction != null ? !settingsAction.equals( 22 that.settingsAction) : that.settingsAction != null) return false; 23 if (configurationActivity != null ? !configurationActivity.equals( 24 that.configurationActivity) : that.configurationActivity != null) return false; 25 if (defaultConditionId != null ? !defaultConditionId.equals( 26 that.defaultConditionId) : that.defaultConditionId != null) return false; 27 if (serviceComponent != null ? !serviceComponent.equals( 28 that.serviceComponent) : that.serviceComponent != null) return false; 29 if (id != null ? !id.equals(that.id) : that.id != null) 30 return false; 31 return packageLabel != null ? packageLabel.equals( 32 that.packageLabel) : that.packageLabel == null; 33 34 } 35 36 public String packageName; 37 public String title; 38 public String settingsAction; 39 public ComponentName configurationActivity; 40 @AutomaticZenRule.Type public int type; 41 public Uri defaultConditionId; 42 @Nullable public String defaultTriggerDescription; 43 public ComponentName serviceComponent; 44 public boolean isSystem; 45 public CharSequence packageLabel; 46 public int ruleInstanceLimit = -1; 47 public String id; 48 } 49