Merge "Expose internal representation of transport types."

This commit is contained in:
Treehugger Robot
2023-05-02 06:43:07 +00:00
committed by Gerrit Code Review

View File

@@ -1347,6 +1347,18 @@ public final class NetworkCapabilities implements Parcelable {
return BitUtils.unpackBits(mTransportTypes);
}
/**
* Gets the transports as an int. Internal callers only.
*
* Prefer getTransportTypes/hasTransportType if not immediately collapsing back into a scalar.
*
* @return a long integer representing the transport types.
* @hide
*/
public long getTransportTypesInternal() {
return mTransportTypes;
}
/**
* Sets all the transports set on this {@code NetworkCapability} instance.
* This overwrites any existing transports.