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

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

Merge "Replace sDefaultToken with new token"

parents 4bae0552 0fcdd8b5
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ import java.util.Set;
public final class AttributionSource implements Parcelable {
    private static final String DESCRIPTOR = "android.content.AttributionSource";

    private static final Binder sDefaultToken = new Binder(DESCRIPTOR);

    private final @NonNull AttributionSourceState mAttributionSourceState;

@@ -100,7 +99,7 @@ public final class AttributionSource implements Parcelable {
    @TestApi
    public AttributionSource(int uid, @Nullable String packageName,
            @Nullable String attributionTag) {
        this(uid, packageName, attributionTag, sDefaultToken);
        this(uid, packageName, attributionTag, new Binder(DESCRIPTOR));
    }

    /** @hide */
@@ -135,7 +134,7 @@ public final class AttributionSource implements Parcelable {

    AttributionSource(int uid, @Nullable String packageName, @Nullable String attributionTag,
            @Nullable String[] renouncedPermissions, @Nullable AttributionSource next) {
        this(uid, packageName, attributionTag, sDefaultToken, renouncedPermissions, next);
        this(uid, packageName, attributionTag, new Binder(DESCRIPTOR), renouncedPermissions, next);
    }

    AttributionSource(int uid, @Nullable String packageName, @Nullable String attributionTag,
@@ -640,7 +639,7 @@ public final class AttributionSource implements Parcelable {
                mAttributionSourceState.next = null;
            }

            mAttributionSourceState.token = sDefaultToken;
            mAttributionSourceState.token = new Binder(DESCRIPTOR);

            if (mAttributionSourceState.next == null) {
                // The NDK aidl backend doesn't support null parcelable arrays.
+1 −0
Original line number Diff line number Diff line
@@ -13,3 +13,4 @@ per-file ContentCaptureOptions* = file:/core/java/android/service/contentcapture
per-file LocusId* = file:/core/java/android/service/contentcapture/OWNERS
per-file ComponentCallbacksController = file:/services/core/java/com/android/server/wm/OWNERS
per-file ComponentCallbacksController = charlesccchen@google.com
per-file AttributionSource* = file:/core/java/android/permission/OWNERS