Merge "Added build from existing NetworkRegistrationInfo" am: 9e6697d6a9 am: 0b0144b84b

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

Change-Id: Iadf6e5acf4d42347e276bde93948f2a0a028c03a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jack Yu
2023-03-25 04:48:14 +00:00
committed by Automerger Merge Worker

View File

@@ -855,6 +855,31 @@ public final class NetworkRegistrationInfo implements Parcelable {
*/ */
public Builder() {} public Builder() {}
/**
* Builder from the existing {@link NetworkRegistrationInfo}.
*
* @param nri The network registration info object.
* @hide
*/
public Builder(@NonNull NetworkRegistrationInfo nri) {
mDomain = nri.mDomain;
mTransportType = nri.mTransportType;
mInitialRegistrationState = nri.mInitialRegistrationState;
mAccessNetworkTechnology = nri.mAccessNetworkTechnology;
mRejectCause = nri.mRejectCause;
mEmergencyOnly = nri.mEmergencyOnly;
mAvailableServices = new ArrayList<>(nri.mAvailableServices);
mCellIdentity = nri.mCellIdentity;
if (nri.mDataSpecificInfo != null) {
mDataSpecificRegistrationInfo = new DataSpecificRegistrationInfo(
nri.mDataSpecificInfo);
}
if (nri.mVoiceSpecificInfo != null) {
mVoiceSpecificRegistrationInfo = new VoiceSpecificRegistrationInfo(
nri.mVoiceSpecificInfo);
}
}
/** /**
* Set the network domain. * Set the network domain.
* *