Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e1dcf56 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Change the delivery group namespace and key delimiter character.

Bug: 249160234
Test: atest tests/app/src/android/app/cts/BroadcastOptionsTest.java
Change-Id: I4904f266b42cd4a0239df092d662669649a9a44b
parent 90cef8f4
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -767,11 +767,11 @@ public class BroadcastOptions extends ComponentOptions {
     */
    @SystemApi
    public void setDeliveryGroupMatchingKey(@NonNull String namespace, @NonNull String key) {
        Preconditions.checkArgument(!namespace.contains("/"),
                "namespace should not contain '/'");
        Preconditions.checkArgument(!key.contains("/"),
                "key should not contain '/'");
        mDeliveryGroupMatchingKey = namespace + "/" + key;
        Preconditions.checkArgument(!namespace.contains(":"),
                "namespace should not contain ':'");
        Preconditions.checkArgument(!key.contains(":"),
                "key should not contain ':'");
        mDeliveryGroupMatchingKey = namespace + ":" + key;
    }

    /**
@@ -779,7 +779,7 @@ public class BroadcastOptions extends ComponentOptions {
     * broadcast belongs to.
     *
     * @return the delivery group namespace and key that was previously set using
     *         {@link #setDeliveryGroupMatchingKey(String, String)}, concatenated with a {@code /}.
     *         {@link #setDeliveryGroupMatchingKey(String, String)}, concatenated with a {@code :}.
     * @hide
     */
    @SystemApi