Skip to content
Snippets Groups Projects
Commit 545fa2aa authored by Ling Ma's avatar Ling Ma Committed by Android (Google) Code Review
Browse files

Merge "Added build from existing NetworkRegistrationInfo"

parents 76170235 dc487d57
No related branches found
No related tags found
No related merge requests found
......@@ -855,6 +855,31 @@ public final class NetworkRegistrationInfo implements Parcelable {
*/
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.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment