diff options
| author | 2024-02-26 19:06:49 +0100 | |
|---|---|---|
| committer | 2024-02-28 12:38:09 +0100 | |
| commit | 9a18a29221c85484f2b514f39a5984c03a3da7cc (patch) | |
| tree | 933225d172fc9c5f394c6a39a0ee37d34fb74505 | |
| parent | c73e2e209bd83c55dfb6e7400277badbfff0530b (diff) | |
Clarify the relationship between owner and configurationActivity of AZR
Bug: 308673538
Test: N/A, documentation change only.
Change-Id: I0518b5af6697075e4a92fc7f1d48a06a149df4fc
| -rw-r--r-- | core/java/android/app/AutomaticZenRule.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/app/AutomaticZenRule.java b/core/java/android/app/AutomaticZenRule.java index f6373d690793..6a05bc07045e 100644 --- a/core/java/android/app/AutomaticZenRule.java +++ b/core/java/android/app/AutomaticZenRule.java @@ -702,7 +702,15 @@ public final class AutomaticZenRule implements Parcelable { } /** - * Sets the component (service or activity) that owns this rule. + * Sets the component name of the + * {@link android.service.notification.ConditionProviderService} that manages this rule + * (but note that {@link android.service.notification.ConditionProviderService} is + * deprecated in favor of using {@link NotificationManager#setAutomaticZenRuleState} to + * notify the system about the state of your rule). + * + * <p>This is exclusive with {@link #setConfigurationActivity}; rules where a configuration + * activity is set will not use the component set here to determine whether the rule + * should be active. */ public @NonNull Builder setOwner(@Nullable ComponentName owner) { mOwner = owner; @@ -740,6 +748,11 @@ public final class AutomaticZenRule implements Parcelable { * information about this rule and/or allows them to configure it. This is required to be * non-null for rules that are not backed by a * {@link android.service.notification.ConditionProviderService}. + * + * <p>This is exclusive with {@link #setOwner}; rules where a configuration + * activity is set will not use the + * {@link android.service.notification.ConditionProviderService} supplied there to determine + * whether the rule should be active. */ public @NonNull Builder setConfigurationActivity( @Nullable ComponentName configurationActivity) { |