Julia Reynolds | f7748e4 | 2015-09-29 08:15:43 -0400 | [diff] [blame] | 1 | package com.android.settings.notification; |
| 2 | |
| 3 | import android.content.ComponentName; |
| 4 | import android.net.Uri; |
| 5 | |
| 6 | public class ZenRuleInfo { |
Julia Reynolds | 83f35ba | 2016-04-13 10:02:18 -0400 | [diff] [blame] | 7 | @Override |
| 8 | public boolean equals(Object o) { |
| 9 | if (this == o) return true; |
| 10 | if (o == null || getClass() != o.getClass()) return false; |
| 11 | |
| 12 | ZenRuleInfo that = (ZenRuleInfo) o; |
| 13 | |
| 14 | if (isSystem != that.isSystem) return false; |
| 15 | if (ruleInstanceLimit != that.ruleInstanceLimit) return false; |
| 16 | if (packageName != null ? !packageName.equals(that.packageName) : that.packageName != null) |
| 17 | return false; |
| 18 | if (title != null ? !title.equals(that.title) : that.title != null) return false; |
| 19 | if (settingsAction != null ? !settingsAction.equals( |
| 20 | that.settingsAction) : that.settingsAction != null) return false; |
| 21 | if (configurationActivity != null ? !configurationActivity.equals( |
| 22 | that.configurationActivity) : that.configurationActivity != null) return false; |
| 23 | if (defaultConditionId != null ? !defaultConditionId.equals( |
| 24 | that.defaultConditionId) : that.defaultConditionId != null) return false; |
| 25 | if (serviceComponent != null ? !serviceComponent.equals( |
| 26 | that.serviceComponent) : that.serviceComponent != null) return false; |
Julia Reynolds | ec84a93 | 2018-12-14 09:27:53 -0500 | [diff] [blame] | 27 | if (id != null ? !id.equals(that.id) : that.id != null) |
| 28 | return false; |
Julia Reynolds | 83f35ba | 2016-04-13 10:02:18 -0400 | [diff] [blame] | 29 | return packageLabel != null ? packageLabel.equals( |
| 30 | that.packageLabel) : that.packageLabel == null; |
| 31 | |
| 32 | } |
| 33 | |
Julia Reynolds | f7748e4 | 2015-09-29 08:15:43 -0400 | [diff] [blame] | 34 | public String packageName; |
| 35 | public String title; |
| 36 | public String settingsAction; |
| 37 | public ComponentName configurationActivity; |
| 38 | public Uri defaultConditionId; |
| 39 | public ComponentName serviceComponent; |
| 40 | public boolean isSystem; |
Julia Reynolds | 8fe6efc | 2015-10-14 17:19:35 -0400 | [diff] [blame] | 41 | public CharSequence packageLabel; |
Julia Reynolds | 0cca0f5 | 2016-01-15 10:11:16 -0500 | [diff] [blame] | 42 | public int ruleInstanceLimit = -1; |
Julia Reynolds | ec84a93 | 2018-12-14 09:27:53 -0500 | [diff] [blame] | 43 | public String id; |
Julia Reynolds | f7748e4 | 2015-09-29 08:15:43 -0400 | [diff] [blame] | 44 | } |