Home
last modified time | relevance | path

Searched refs:conditionId (Results 1 – 25 of 31) sorted by relevance

12

/frameworks/base/services/core/java/com/android/server/notification/
DScheduleConditionProvider.java97 for (Uri conditionId : mSubscriptions.keySet()) { in dump()
99 pw.print(meetsSchedule(mSubscriptions.get(conditionId), now) ? "* " : " "); in dump()
100 pw.println(conditionId); in dump()
102 pw.println(mSubscriptions.get(conditionId).toString()); in dump()
129 public void onSubscribe(Uri conditionId) { in onSubscribe() argument
130 if (DEBUG) Slog.d(TAG, "onSubscribe " + conditionId); in onSubscribe()
131 if (!ZenModeConfig.isValidScheduleConditionId(conditionId)) { in onSubscribe()
132 notifyCondition(createCondition(conditionId, Condition.STATE_ERROR, "invalidId")); in onSubscribe()
136 mSubscriptions.put(conditionId, ZenModeConfig.toScheduleCalendar(conditionId)); in onSubscribe()
142 public void onUnsubscribe(Uri conditionId) { in onUnsubscribe() argument
[all …]
DCountdownConditionProvider.java111 public void onSubscribe(Uri conditionId) { in onSubscribe() argument
112 if (DEBUG) Slog.d(TAG, "onSubscribe " + conditionId); in onSubscribe()
113 mTime = ZenModeConfig.tryParseCountdownConditionId(conditionId); in onSubscribe()
114 mIsAlarm = ZenModeConfig.isValidCountdownToAlarmConditionId(conditionId); in onSubscribe()
118 .putExtra(EXTRA_CONDITION_ID, conditionId) in onSubscribe()
142 public void onUnsubscribe(Uri conditionId) { in onUnsubscribe() argument
150 final Uri conditionId = intent.getParcelableExtra(EXTRA_CONDITION_ID); in onReceive() local
151 final boolean alarm = ZenModeConfig.isValidCountdownToAlarmConditionId(conditionId); in onReceive()
152 final long time = ZenModeConfig.tryParseCountdownConditionId(conditionId); in onReceive()
153 if (DEBUG) Slog.d(TAG, "Countdown condition fired: " + conditionId); in onReceive()
DEventConditionProvider.java102 for (Uri conditionId : mSubscriptions) { in dump()
104 pw.println(conditionId); in dump()
145 public void onSubscribe(Uri conditionId) { in onSubscribe() argument
146 if (DEBUG) Slog.d(TAG, "onSubscribe " + conditionId); in onSubscribe()
147 if (!ZenModeConfig.isValidEventConditionId(conditionId)) { in onSubscribe()
148 notifyCondition(createCondition(conditionId, Condition.STATE_FALSE)); in onSubscribe()
152 if (mSubscriptions.add(conditionId)) { in onSubscribe()
159 public void onUnsubscribe(Uri conditionId) { in onUnsubscribe() argument
160 if (DEBUG) Slog.d(TAG, "onUnsubscribe " + conditionId); in onUnsubscribe()
162 if (mSubscriptions.remove(conditionId)) { in onUnsubscribe()
[all …]
DZenModeConditions.java125 if (rule == null || rule.conditionId == null) return; in evaluateRule()
127 final Uri id = rule.conditionId; in evaluateRule()
146 Log.w(TAG, "No component found for automatic rule: " + rule.conditionId); in evaluateRule()
158 if (mConditionProviders.subscribeIfNecessary(rule.component, rule.conditionId)) { in evaluateRule()
160 mSubscriptions.put(rule.conditionId, rule.component); in evaluateRule()
169 rule.condition = mConditionProviders.findCondition(rule.component, rule.conditionId); in evaluateRule()
171 + rule.conditionId); in evaluateRule()
178 if (DEBUG) Log.d(TAG, "Snoozing reset for " + rule.conditionId); in updateSnoozing()
DConditionProviders.java277 public Condition findCondition(ComponentName component, Uri conditionId) { in findCondition() argument
278 if (component == null || conditionId == null) return null; in findCondition()
280 final ConditionRecord r = getRecordLocked(conditionId, component, false /*create*/); in findCondition()
285 public void ensureRecordExists(ComponentName component, Uri conditionId, in ensureRecordExists() argument
289 final ConditionRecord r = getRecordLocked(conditionId, component, true /*create*/); in ensureRecordExists()
297 public boolean subscribeIfNecessary(ComponentName component, Uri conditionId) { in subscribeIfNecessary() argument
299 final ConditionRecord r = getRecordLocked(conditionId, component, false /*create*/); in subscribeIfNecessary()
301 Slog.w(TAG, "Unable to subscribe to " + component + " " + conditionId); in subscribeIfNecessary()
310 public void unsubscribeIfNecessary(ComponentName component, Uri conditionId) { in unsubscribeIfNecessary() argument
312 final ConditionRecord r = getRecordLocked(conditionId, component, false /*create*/); in unsubscribeIfNecessary()
[all …]
DZenModeHelper.java437 if (id == null || rule == null || rule.conditionId == null) return false; in ruleMatches()
438 if (!rule.conditionId.equals(id)) return false; in ruleMatches()
446 if (DEBUG) Log.d(TAG, "Snoozing reset for " + rule.conditionId); in updateSnoozing()
564 rule.conditionId = automaticZenRule.getConditionId(); in populateZenRule()
574 rule.conditionId, rule.zenPolicy, in createAutomaticZenRule()
579 public void setManualZenMode(int zenMode, Uri conditionId, String caller, String reason) { in setManualZenMode() argument
580 setManualZenMode(zenMode, conditionId, reason, caller, true /*setRingerMode*/); in setManualZenMode()
585 private void setManualZenMode(int zenMode, Uri conditionId, String reason, String caller, in setManualZenMode() argument
592 + " conditionId=" + conditionId + " reason=" + reason in setManualZenMode()
606 newRule.conditionId = conditionId; in setManualZenMode()
/frameworks/base/core/java/android/app/
DAutomaticZenRule.java42 private Uri conditionId; field in AutomaticZenRule
62 public AutomaticZenRule(String name, ComponentName owner, Uri conditionId, in AutomaticZenRule() argument
64 this(name, owner, null, conditionId, null, interruptionFilter, enabled); in AutomaticZenRule()
93 @Nullable ComponentName configurationActivity, @NonNull Uri conditionId, in AutomaticZenRule() argument
98 this.conditionId = conditionId; in AutomaticZenRule()
108 Uri conditionId, ZenPolicy policy, int interruptionFilter, boolean enabled, in AutomaticZenRule() argument
110 this(name, owner, configurationActivity, conditionId, policy, interruptionFilter, enabled); in AutomaticZenRule()
120 conditionId = source.readParcelable(null); in AutomaticZenRule()
147 return conditionId; in getConditionId()
196 public void setConditionId(Uri conditionId) { in setConditionId() argument
[all …]
DNotificationManager.java855 public void setZenMode(int mode, Uri conditionId, String reason) { in setZenMode() argument
858 service.setZenMode(mode, conditionId, reason); in setZenMode()
927 rule.configurationActivity, rule.conditionId, rule.zenPolicy, in getAutomaticZenRules()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DScheduleConditionProviderTest.java74 Uri conditionId = ZenModeConfig.toScheduleConditionId(info); in testIsValidConditionId() local
75 assertTrue(mService.isValidConditionId(conditionId)); in testIsValidConditionId()
91 Uri conditionId = ZenModeConfig.toScheduleConditionId(info); in testEvaluateSubscription_noAlarmExit_InSchedule() local
97 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_InSchedule()
115 Uri conditionId = ZenModeConfig.toScheduleConditionId(info); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed() local
120 mService.addSnoozed(conditionId); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed()
123 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed()
146 Uri conditionId = ZenModeConfig.toScheduleConditionId(info); in testEvaluateSubscription_noAlarmExit_beforeSchedule() local
151 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_beforeSchedule()
169 Uri conditionId = ZenModeConfig.toScheduleConditionId(info); in testEvaluateSubscription_noAlarmExit_endSchedule() local
[all …]
DZenModeConfigTest.java138 Uri conditionId = ZenModeConfig.toEventConditionId(oldEvent); in testParseOldEvent() local
139 EventInfo eventParsed = ZenModeConfig.tryParseEventConditionId(conditionId); in testParseOldEvent()
150 Uri conditionId = ZenModeConfig.toEventConditionId(event); in testParseNewEvent() local
151 EventInfo eventParsed = ZenModeConfig.tryParseEventConditionId(conditionId); in testParseNewEvent()
162 rule.conditionId = new Uri.Builder().scheme("hello").build(); in testRuleXml()
163 rule.condition = new Condition(rule.conditionId, "", Condition.STATE_TRUE); in testRuleXml()
198 assertEquals(rule.conditionId, fromXml.conditionId); in testRuleXml()
DZenModeHelperTest.java209 customRule.conditionId = ZenModeConfig.toScheduleConditionId(customRuleInfo); in getCustomAutomaticRules()
824 customRule.conditionId = ZenModeConfig.toScheduleConditionId(customRuleInfo); in testWriteXmlWithZenPolicy()
869 customRule.conditionId = ZenModeConfig.toScheduleConditionId(customRuleInfo); in testReadXmlRestoreWithZenPolicy_forSystemUser()
904 customRule.conditionId = ZenModeConfig.toScheduleConditionId(weeknights); in testReadXmlRulesNotOverriden()
1069 customRule.conditionId = ZenModeConfig.toScheduleConditionId(weeknights); in testReadXmlAllDisabledRulesResetDefaultRules()
1105 customRule.conditionId = ZenModeConfig.toScheduleConditionId(customRuleInfo); in testReadXmlOnlyOneDefaultRuleExists()
1118 defaultScheduleRule.conditionId = ZenModeConfig.toScheduleConditionId( in testReadXmlOnlyOneDefaultRuleExists()
1156 customRule.conditionId = ZenModeConfig.toScheduleConditionId(customRuleInfo); in testReadXmlDefaultRulesExist()
1169 defaultScheduleRule.conditionId = ZenModeConfig.toScheduleConditionId( in testReadXmlDefaultRulesExist()
1183 defaultEventRule.conditionId = ZenModeConfig.toScheduleConditionId( in testReadXmlDefaultRulesExist()
[all …]
/frameworks/base/core/java/android/service/notification/
DZenModeConfig.java378 && rule.conditionId != null && sameCondition(rule); in isValidAutomaticRule()
383 if (rule.conditionId == null) { in sameCondition()
386 return rule.condition == null || rule.conditionId.equals(rule.condition.id); in sameCondition()
644 rt.conditionId = safeUri(parser, RULE_ATT_CONDITION_ID); in readRuleXml()
658 && Condition.isValidId(rt.conditionId, SYSTEM_AUTHORITY)) { in readRuleXml()
680 if (rule.conditionId != null) { in writeRuleXml()
681 out.attribute(null, RULE_ATT_CONDITION_ID, rule.conditionId.toString()); in writeRuleXml()
1133 public static ScheduleCalendar toScheduleCalendar(Uri conditionId) { in toScheduleCalendar() argument
1134 final ScheduleInfo schedule = ZenModeConfig.tryParseScheduleConditionId(conditionId); in toScheduleCalendar()
1292 public static long tryParseCountdownConditionId(Uri conditionId) { in tryParseCountdownConditionId() argument
[all …]
DConditionProviderService.java137 abstract public void onSubscribe(Uri conditionId); in onSubscribe() argument
143 abstract public void onUnsubscribe(Uri conditionId); in onUnsubscribe() argument
251 public void onSubscribe(Uri conditionId) { in onSubscribe() argument
252 mHandler.obtainMessage(H.ON_SUBSCRIBE, conditionId).sendToTarget(); in onSubscribe()
256 public void onUnsubscribe(Uri conditionId) { in onUnsubscribe() argument
257 mHandler.obtainMessage(H.ON_UNSUBSCRIBE, conditionId).sendToTarget(); in onUnsubscribe()
DIConditionProvider.aidl25 void onSubscribe(in Uri conditionId); in onSubscribe() argument
26 void onUnsubscribe(in Uri conditionId); in onUnsubscribe() argument
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/notification/
DEnableZenModeDialog.java198 final Uri conditionId = getConditionId(tag.condition); in bind() local
200 + first + " condition=" + conditionId); in bind()
207 if (DEBUG) Log.d(TAG, "onCheckedChanged " + conditionId); in bind()
215 updateUi(tag, row, condition, enabled, rowId, conditionId); in bind()
328 boolean enabled, int rowId, Uri conditionId) { in updateUi() argument
379 final long time = ZenModeConfig.tryParseCountdownConditionId(conditionId); in updateUi()
425 final Uri conditionId = getConditionId(tag.condition); in onClickTimeButton() local
426 final long time = ZenModeConfig.tryParseCountdownConditionId(conditionId); in onClickTimeButton()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DZenModePanel.java415 : createCondition(rule.conditionId); in handleUpdateManualRule()
420 private Condition createCondition(Uri conditionId) { in createCondition() argument
421 if (ZenModeConfig.isValidCountdownToAlarmConditionId(conditionId)) { in createCondition()
422 long time = ZenModeConfig.tryParseCountdownConditionId(conditionId); in createCondition()
426 } else if (ZenModeConfig.isValidCountdownConditionId(conditionId)) { in createCondition()
427 long time = ZenModeConfig.tryParseCountdownConditionId(conditionId); in createCondition()
654 final Uri conditionId = getConditionId(tag.condition); in bind() local
656 + first + " condition=" + conditionId); in bind()
663 if (DEBUG) Log.d(mTag, "onCheckedChanged " + conditionId); in bind()
717 final long time = ZenModeConfig.tryParseCountdownConditionId(conditionId); in bind()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DZenModeController.java29 void setZen(int zen, Uri conditionId, String reason); in setZen() argument
DZenModeControllerImpl.java146 public void setZen(int zen, Uri conditionId, String reason) { in setZen() argument
147 mNoMan.setZenMode(zen, conditionId, reason); in setZen()
/frameworks/base/cmds/statsd/benchmark/
Dget_dimensions_for_condition_benchmark.cpp41 link->conditionId = 1; in createLogEventAndLink()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/
DFakeZenModeController.java33 public void setZen(int zen, Uri conditionId, String reason) { in setZen() argument
/frameworks/base/cmds/statsd/src/
DHashableDimensionKey.h32 int64_t conditionId; member
/frameworks/base/cmds/statsd/src/metrics/
DEventMetricProducer.cpp62 mc.conditionId = link.condition(); in EventMetricProducer()
DDurationMetricProducer.cpp113 mc.conditionId = link.condition(); in DurationMetricProducer()
399 &conditionKey[link.conditionId]); in onSlicedConditionMayChangeInternalLocked()
796 getDimensionForCondition(event.getValues(), link, &conditionKey[link.conditionId]); in onMatchedLogEventLocked()
DMetricProducer.cpp57 getDimensionForCondition(event.getValues(), link, &conditionKey[link.conditionId]); in onMatchedLogEventLocked()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DDndTile.java185 Uri conditionId = ZenModeConfig.toTimeCondition(mContext, zenDuration, in showDetail() local
188 conditionId, TAG); in showDetail()

12