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

Commit f7e9afbe authored by Calvin Pan's avatar Calvin Pan
Browse files

Check the timeout only the reason is CF_REASON_NO_REPLY

The timeout in call forwarding is only valid for CF_REASON_NO_REPLY
reason, so only check if reason is CF_REASON_NO_REPLY

Bug: 194112447
Test: enable/disable call forwarding
Change-Id: I290d5fa64f0a32ddcaf1f16c51b99f52e8e38913
parent 906b2ed5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14302,7 +14302,8 @@ public class TelephonyManager {
            if (callForwardingInfo.getNumber() == null) {
                throw new IllegalArgumentException("callForwarding number is null");
            }
            if (callForwardingInfo.getTimeoutSeconds() <= 0) {
            if (callForwardingReason == CallForwardingInfo.REASON_NO_REPLY
                        && callForwardingInfo.getTimeoutSeconds() <= 0) {
                throw new IllegalArgumentException("callForwarding timeout isn't positive");
            }
        }