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

Commit e3d9df7a authored by Austin Borger's avatar Austin Borger
Browse files

Check for null in AttributionSource#Builder#setNextAttributionSource

Manually checking for null is less ambiguous.

Test: atest CtsAttributionSourceTestCases / ServiceUwbTests
Bug: 331842764
Change-Id: If1210893266d8f8a8e9a34ff86ebd93a1669cbc2
parent c14c34a0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -753,6 +753,9 @@ public final class AttributionSource implements Parcelable {
        @FlaggedApi(Flags.FLAG_SET_NEXT_ATTRIBUTION_SOURCE)
        public @NonNull Builder setNextAttributionSource(@NonNull AttributionSource value) {
            checkNotUsed();
            if (value == null) {
                throw new IllegalArgumentException("Null AttributionSource not permitted.");
            }
            mBuilderFieldsSet |= 0x20;
            mAttributionSourceState.next =
                    new AttributionSourceState[]{value.mAttributionSourceState};