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

Commit bd7e7d72 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Add @RedactionType annotations to VpnTransportInfo.

This is in response to API council feedback.

Test: m
Bug: 185226718
Change-Id: I63d7249e7d14ac00558f311a3583f6adbf80e3d9
parent f94ff5a3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import static android.net.NetworkCapabilities.REDACT_FOR_NETWORK_SETTINGS;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.net.NetworkCapabilities.RedactionType;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -45,7 +46,7 @@ public final class VpnTransportInfo implements TransportInfo, Parcelable {
    public final String sessionId;

    @Override
    public long getApplicableRedactions() {
    public @RedactionType long getApplicableRedactions() {
        return REDACT_FOR_NETWORK_SETTINGS;
    }

@@ -53,7 +54,7 @@ public final class VpnTransportInfo implements TransportInfo, Parcelable {
     * Create a copy of a {@link VpnTransportInfo} with the sessionId redacted if necessary.
     */
    @NonNull
    public VpnTransportInfo makeCopy(long redactions) {
    public VpnTransportInfo makeCopy(@RedactionType long redactions) {
        return new VpnTransportInfo(type,
            ((redactions & REDACT_FOR_NETWORK_SETTINGS) != 0) ? null : sessionId);
    }