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

Commit 4b3d0ddd authored by sandeepjs's avatar sandeepjs
Browse files

[MEP] Temporarily bypassing exception

Temporarily bypassing exceptions until refectoring deprecated callers.
Bug: 202110963
Test: Build

Change-Id: I43b0b06b6f77d59a6edb94a54a85db2207cf3c8e
parent 78337f8a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -156,9 +156,11 @@ public final class UiccCardInfo implements Parcelable {
    @Nullable
    @Deprecated
    public String getIccId() {
        if (mIccIdAccessRestricted) {
            throw new UnsupportedOperationException("getIccId from UiccPortInfo");
        }
        // Temporarily bypassing exception
        // TODO: add exception once refactoring completed.
        //if (mIccIdAccessRestricted) {
        //    throw new UnsupportedOperationException("getIccId from UiccPortInfo");
        //}
        //always return ICCID from first port.
        return getPorts().stream().findFirst().get().getIccId();
    }
+10 −6
Original line number Diff line number Diff line
@@ -159,9 +159,11 @@ public class UiccSlotInfo implements Parcelable {
     */
    @Deprecated
    public boolean getIsActive() {
        if (mLogicalSlotAccessRestricted) {
            throw new UnsupportedOperationException("get port status from UiccPortInfo");
        }
        // Temporarily bypassing exception
        // TODO: add exception once refactoring completed.
        //if (mLogicalSlotAccessRestricted) {
        //    throw new UnsupportedOperationException("get port status from UiccPortInfo");
        //}
        //always return status from first port.
        return getPorts().stream().findFirst().get().isActive();
    }
@@ -196,9 +198,11 @@ public class UiccSlotInfo implements Parcelable {
     */
    @Deprecated
    public int getLogicalSlotIdx() {
        if (mLogicalSlotAccessRestricted) {
            throw new UnsupportedOperationException("get logical slot index from UiccPortInfo");
        }
        // Temporarily bypassing exception
        // TODO: add exception once refactoring completed.
        //if (mLogicalSlotAccessRestricted) {
        //    throw new UnsupportedOperationException("get logical slot index from UiccPortInfo");
        //}
        //always return logical slot index from first port.
        //portList always have at least one element.
        return getPorts().stream().findFirst().get().getLogicalSlotIndex();