Updating iccCloseLogicalChannel API

Updating iccCloseLogicalChannel API to catch exceptions.

Test: atest android.carrierapi.cts.CarrierApiTest#testIccCloseLogicalChannel
Bug: 213898262
Change-Id: I6267518c94a111df1924c8a74dcd5c3561674e70
This commit is contained in:
sandeepjs
2022-02-04 09:44:49 +00:00
parent 1a6f762f29
commit e38fd07f0a

View File

@@ -7118,7 +7118,14 @@ public class TelephonyManager {
*/
@RequiresFeature(PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION)
public boolean iccCloseLogicalChannel(int channel) {
return iccCloseLogicalChannel(getSubId(), channel);
try {
return iccCloseLogicalChannel(getSubId(), channel);
} catch (IllegalStateException ex) {
Rlog.e(TAG, "iccCloseLogicalChannel IllegalStateException", ex);
} catch (IllegalArgumentException ex) {
Rlog.e(TAG, "iccCloseLogicalChannel IllegalArgumentException", ex);
}
return false;
}
/**