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

Commit 395f6aed authored by Chen Xu's avatar Chen Xu Committed by Automerger Merge Worker
Browse files

Merge "Updating the error message for clear understanding of Deprecated...

Merge "Updating the error message for clear understanding of Deprecated methods. Test: manual Bug: 234089071" into tm-dev am: 399d8e96 am: d779fb84 am: 613fb9d4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18620716



Change-Id: I80d63d964c9dcdeba8ab49f2ad50c64bc3726e72
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 758e755c 613fb9d4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -162,7 +162,8 @@ public final class UiccCardInfo implements Parcelable {
    @Deprecated
    public String getIccId() {
        if (mIccIdAccessRestricted) {
            throw new UnsupportedOperationException("getIccId from UiccPortInfo");
            throw new UnsupportedOperationException("getIccId() is not supported by UiccCardInfo."
                + " Please Use UiccPortInfo API instead");
        }
        //always return ICCID from first port.
        return getPorts().stream().findFirst().get().getIccId();
+4 −2
Original line number Diff line number Diff line
@@ -161,7 +161,8 @@ public class UiccSlotInfo implements Parcelable {
    @Deprecated
    public boolean getIsActive() {
        if (mLogicalSlotAccessRestricted) {
            throw new UnsupportedOperationException("get port status from UiccPortInfo");
            throw new UnsupportedOperationException("getIsActive() is not supported by "
            + "UiccSlotInfo. Please Use UiccPortInfo API instead");
        }
        //always return status from first port.
        return getPorts().stream().findFirst().get().isActive();
@@ -198,7 +199,8 @@ public class UiccSlotInfo implements Parcelable {
    @Deprecated
    public int getLogicalSlotIdx() {
        if (mLogicalSlotAccessRestricted) {
            throw new UnsupportedOperationException("get logical slot index from UiccPortInfo");
            throw new UnsupportedOperationException("getLogicalSlotIdx() is not supported by "
                + "UiccSlotInfo. Please use UiccPortInfo API instead");
        }
        //always return logical slot index from first port.
        //portList always have at least one element.