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

Commit 3ad56027 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add input validation for throttlingTimeSec in onDeregistered" into main

parents 86ce0e2d 30c2e843
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18670,7 +18670,7 @@ package android.telephony.ims.stub {
    method public final void onDeregistered(android.telephony.ims.ImsReasonInfo);
    method public final void onDeregistered(@Nullable android.telephony.ims.ImsReasonInfo, int, int);
    method @FlaggedApi("com.android.internal.telephony.flags.emergency_registration_state") public final void onDeregistered(@Nullable android.telephony.ims.ImsReasonInfo, int, @NonNull android.telephony.ims.ImsRegistrationAttributes);
    method @FlaggedApi("com.android.internal.telephony.flags.support_throttle_time_for_deregistration") public final void onDeregistered(@Nullable android.telephony.ims.ImsReasonInfo, int, @NonNull android.telephony.ims.ImsRegistrationAttributes, int);
    method @FlaggedApi("com.android.internal.telephony.flags.support_throttle_time_for_deregistration") public final void onDeregistered(@Nullable android.telephony.ims.ImsReasonInfo, int, @NonNull android.telephony.ims.ImsRegistrationAttributes, @IntRange(from=0) int);
    method public final void onDeregistered(@Nullable android.telephony.ims.ImsReasonInfo, @NonNull android.telephony.ims.SipDetails);
    method public final void onDeregistered(@Nullable android.telephony.ims.ImsReasonInfo, int, int, @NonNull android.telephony.ims.SipDetails);
    method public final void onRegistered(int);
+10 −1
Original line number Diff line number Diff line
@@ -645,13 +645,22 @@ public class ImsRegistrationImplBase {
     * @param suggestedAction the expected behavior of radio protocol stack.
     * @param attributes The attributes associated with the IMS registration
     * @param throttlingTimeSec The registration throttling time in seconds.
     *                          This value must be 0 or greater. A value of 0 indicates that no
     *                          specific throttling time is being requested.
     * @throws IllegalArgumentException if throttlingTimeSec is a negative value.
     * @hide This API is not part of the Android public SDK API
     */
    @SystemApi
    @FlaggedApi(Flags.FLAG_SUPPORT_THROTTLE_TIME_FOR_DEREGISTRATION)
    public final void onDeregistered(@Nullable ImsReasonInfo info,
            @RegistrationManager.SuggestedAction int suggestedAction,
            @NonNull ImsRegistrationAttributes attributes, int throttlingTimeSec) {
            @NonNull ImsRegistrationAttributes attributes,
            @IntRange(from = 0) int throttlingTimeSec) {
        if (throttlingTimeSec < 0) {
            throw new IllegalArgumentException("throttlingTimeSec cannot be negative: "
                    + throttlingTimeSec);
        }

        boolean isEmergency = isEmergency(attributes);
        int imsRadioTech = attributes.getRegistrationTechnology();
        if (isEmergency) {