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

Commit ec943795 authored by Hidayat Khan's avatar Hidayat Khan
Browse files

Add getters for emer-reg flag to fix build warning

Bug: 341105139
Test: atest CtsTelephonyTestCases
Flag: ImsRegistrationAttributes.ATTR_REGISTRATION_TYPE_EMERGENCY
Flag: ImsRegistrationAttributes.ATTR_VIRTUAL_FOR_ANONYMOUS_EMERGENCY_CALL
Change-Id: Id9fcdf1c4604cfb54ef1bb86d67e319985dcf782
parent a1dcd5ae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -47134,6 +47134,8 @@ package android.telephony.ims {
    method public int describeContents();
    method public int getAttributeFlags();
    method @NonNull public java.util.Set<java.lang.String> getFeatureTags();
    method @FlaggedApi("com.android.internal.telephony.flags.emergency_registration_state") public boolean getFlagRegistrationTypeEmergency();
    method @FlaggedApi("com.android.internal.telephony.flags.emergency_registration_state") public boolean getFlagVirtualRegistrationForEmergencyCall();
    method @Nullable public android.telephony.ims.SipDetails getSipDetails();
    method public int getTransportType();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
+20 −0
Original line number Diff line number Diff line
@@ -255,6 +255,26 @@ public final class ImsRegistrationAttributes implements Parcelable {
        return mImsAttributeFlags;
    }

    /**
     * Get the attribute flag ATTR_REGISTRATION_TYPE_EMERGENCY.
     * @return {@code true} if the ATTR_REGISTRATION_TYPE_EMERGENCY attribute has been set, or
     * {@code false} if it has not been set.
     */
    @FlaggedApi(Flags.FLAG_EMERGENCY_REGISTRATION_STATE)
    public boolean getFlagRegistrationTypeEmergency() {
        return (mImsAttributeFlags & ATTR_REGISTRATION_TYPE_EMERGENCY) != 0;
    }

    /**
     * Get the attribute flag ATTR_VIRTUAL_FOR_ANONYMOUS_EMERGENCY_CALL.
     * @return {@code true} if the ATTR_VIRTUAL_FOR_ANONYMOUS_EMERGENCY_CALL attribute has been set,
     * or {@code false} if it has not been set.
     */
    @FlaggedApi(Flags.FLAG_EMERGENCY_REGISTRATION_STATE)
    public boolean getFlagVirtualRegistrationForEmergencyCall() {
        return (mImsAttributeFlags & ATTR_VIRTUAL_FOR_ANONYMOUS_EMERGENCY_CALL) != 0;
    }

    /**
     * Gets the Set of feature tags associated with the current IMS registration, if the IMS
     * service supports supplying this information.