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

Commit 30c2e843 authored by yongnamcha's avatar yongnamcha Committed by Yongnam Cha
Browse files

Add input validation for throttlingTimeSec in onDeregistered

The onDeregistered method accepts a throttlingTimeSec parameter, which is intended to be a non-negative value representing a time in seconds.
However, there was no explicit validation to prevent negative values from being passed.
Passing a negative value is invalid and could lead to undefined behavior.
This change introduces validation for the throttlingTimeSec parameter:
An IllegalArgumentException is now thrown if throttlingTimeSec is negative.
The @IntRange(from = 0) annotation has been added to enforce this constraint at the API level.
The Javadoc for the method has been updated to reflect this new validation and clarify the parameter's expected range.
This makes the API more robust by ensuring only valid inputs are processed.

Bug: 412452528
Test: atest ImsServiceTest
Flag: com.android.internal.telephony.flags.support_throttle_time_for_deregistration
Change-Id: I9646fc2ced6bf74c50447aeb13cabc4a0afeb4f5
parent eff6d198
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment