Lines Matching defs:to

10  * Unless required by applicable law or agreed to in writing, software
193 private Diff diff(ZenModeConfig to) {
195 if (to == null) {
198 if (user != to.user) {
199 d.addLine("user", user, to.user);
201 if (allowCalls != to.allowCalls) {
202 d.addLine("allowCalls", allowCalls, to.allowCalls);
204 if (allowRepeatCallers != to.allowRepeatCallers) {
205 d.addLine("allowRepeatCallers", allowRepeatCallers, to.allowRepeatCallers);
207 if (allowMessages != to.allowMessages) {
208 d.addLine("allowMessages", allowMessages, to.allowMessages);
210 if (allowCallsFrom != to.allowCallsFrom) {
211 d.addLine("allowCallsFrom", allowCallsFrom, to.allowCallsFrom);
213 if (allowMessagesFrom != to.allowMessagesFrom) {
214 d.addLine("allowMessagesFrom", allowMessagesFrom, to.allowMessagesFrom);
216 if (allowReminders != to.allowReminders) {
217 d.addLine("allowReminders", allowReminders, to.allowReminders);
219 if (allowEvents != to.allowEvents) {
220 d.addLine("allowEvents", allowEvents, to.allowEvents);
224 addKeys(allRules, to.automaticRules);
229 final ZenRule toRule = to.automaticRules != null ? to.automaticRules.get(rule) : null;
232 ZenRule.appendDiff(d, "manualRule", manualRule, to.manualRule);
236 public static Diff diff(ZenModeConfig from, ZenModeConfig to) {
239 if (to != null) {
244 return from.diff(to);
423 throw new IllegalStateException("Failed to reach END_DOCUMENT");
505 Slog.w(TAG, "Unable to read condition xml", e);
987 private static void appendDiff(Diff d, String item, ZenRule from, ZenRule to) {
990 if (to != null) {
995 from.appendDiff(d, item, to);
998 private void appendDiff(Diff d, String item, ZenRule to) {
999 if (to == null) {
1003 if (enabled != to.enabled) {
1004 d.addLine(item, "enabled", enabled, to.enabled);
1006 if (snoozing != to.snoozing) {
1007 d.addLine(item, "snoozing", snoozing, to.snoozing);
1009 if (!Objects.equals(name, to.name)) {
1010 d.addLine(item, "name", name, to.name);
1012 if (zenMode != to.zenMode) {
1013 d.addLine(item, "zenMode", zenMode, to.zenMode);
1015 if (!Objects.equals(conditionId, to.conditionId)) {
1016 d.addLine(item, "conditionId", conditionId, to.conditionId);
1018 if (!Objects.equals(condition, to.condition)) {
1019 d.addLine(item, "condition", condition, to.condition);
1021 if (!Objects.equals(component, to.component)) {
1022 d.addLine(item, "component", component, to.component);
1176 throw new IllegalStateException("Failed to reach END_DOCUMENT");
1205 public Diff addLine(String item, String subitem, Object from, Object to) {
1206 return addLine(item + "." + subitem, from, to);
1209 public Diff addLine(String item, Object from, Object to) {
1210 return addLine(item, from + "->" + to);