Merge "[FUI20] Expose UnderlyingNetworkInfo as system Api" am: 75b50a5c73

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1563496

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icbc3c9f8e1ac8064e2e006587b4d4870d74cee2d
This commit is contained in:
Junyu Lai
2021-02-03 03:03:01 +00:00
committed by Automerger Merge Worker

View File

@@ -16,11 +16,15 @@
package android.net; package android.net;
import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@@ -30,6 +34,7 @@ import java.util.Objects;
* *
* @hide * @hide
*/ */
@SystemApi(client = MODULE_LIBRARIES)
public final class UnderlyingNetworkInfo implements Parcelable { public final class UnderlyingNetworkInfo implements Parcelable {
/** The owner of this network. */ /** The owner of this network. */
public final int ownerUid; public final int ownerUid;
@@ -46,7 +51,7 @@ public final class UnderlyingNetworkInfo implements Parcelable {
Objects.requireNonNull(underlyingIfaces); Objects.requireNonNull(underlyingIfaces);
this.ownerUid = ownerUid; this.ownerUid = ownerUid;
this.iface = iface; this.iface = iface;
this.underlyingIfaces = underlyingIfaces; this.underlyingIfaces = Collections.unmodifiableList(new ArrayList<>(underlyingIfaces));
} }
private UnderlyingNetworkInfo(@NonNull Parcel in) { private UnderlyingNetworkInfo(@NonNull Parcel in) {