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

Commit 0b0144b8 authored by Jack Yu's avatar Jack Yu Committed by Automerger Merge Worker
Browse files

Merge "Added build from existing NetworkRegistrationInfo" am: 9e6697d6

parents 2751fae9 9e6697d6
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -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.
         *