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

Commit 032d8e1b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AttributionSource: Deprecate setNext, add new setNextAttributionSource"

parents ea713c4c aa1569c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -9703,7 +9703,8 @@ package android.content {
    ctor public AttributionSource.Builder(@NonNull android.content.AttributionSource);
    method @NonNull public android.content.AttributionSource build();
    method @NonNull public android.content.AttributionSource.Builder setAttributionTag(@Nullable String);
    method @NonNull public android.content.AttributionSource.Builder setNext(@Nullable android.content.AttributionSource);
    method @Deprecated @NonNull public android.content.AttributionSource.Builder setNext(@Nullable android.content.AttributionSource);
    method @NonNull public android.content.AttributionSource.Builder setNextAttributionSource(@NonNull android.content.AttributionSource);
    method @NonNull public android.content.AttributionSource.Builder setPackageName(@Nullable String);
    method @NonNull public android.content.AttributionSource.Builder setPid(int);
  }
+14 −0
Original line number Diff line number Diff line
@@ -662,7 +662,10 @@ public final class AttributionSource implements Parcelable {

        /**
         * The next app to receive the permission protected data.
         *
         * @deprecated Use {@link setNextAttributionSource} instead.
         */
        @Deprecated
        public @NonNull Builder setNext(@Nullable AttributionSource value) {
            checkNotUsed();
            mBuilderFieldsSet |= 0x20;
@@ -671,6 +674,17 @@ public final class AttributionSource implements Parcelable {
            return this;
        }

        /**
         * The next app to receive the permission protected data.
         */
        public @NonNull Builder setNextAttributionSource(@NonNull AttributionSource value) {
            checkNotUsed();
            mBuilderFieldsSet |= 0x20;
            mAttributionSourceState.next =
                    new AttributionSourceState[]{value.mAttributionSourceState};
            return this;
        }

        /** Builds the instance. This builder should not be touched after calling this! */
        public @NonNull AttributionSource build() {
            checkNotUsed();