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

Commit 4e75dbb9 authored by Martijn Coenen's avatar Martijn Coenen Committed by Android (Google) Code Review
Browse files

Merge "Connecting to a NFC technology may fail."

parents 49470743 ea51a427
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ public class ErrorCodes {
            case ERROR_SE_ALREADY_SELECTED: return "SE_ALREADY_SELECTED";
            case ERROR_SE_CONNECTED: return "SE_CONNECTED";
            case ERROR_NO_SE_CONNECTED: return "NO_SE_CONNECTED";
            case ERROR_NOT_SUPPORTED: return "NOT_SUPPORTED";
            default: return "UNKNOWN ERROR";
        }
    }
@@ -105,4 +106,6 @@ public class ErrorCodes {

    public static final int ERROR_NO_SE_CONNECTED = -20;

    public static final int ERROR_NOT_SUPPORTED = -21;

}
+4 −0
Original line number Diff line number Diff line
@@ -77,6 +77,10 @@ import java.io.IOException;
                // Store this in the tag object
                mTag.setConnectedTechnology(mSelectedTechnology);
                mIsConnected = true;
            } else if (errorCode == ErrorCodes.ERROR_NOT_SUPPORTED) {
                throw new UnsupportedOperationException("Connecting to " +
                        "this technology is not supported by the NFC " +
                        "adapter.");
            } else {
                throw new IOException();
            }