diff --git a/framework-t/api/system-current.txt b/framework-t/api/system-current.txt index 3513573839..d346af3855 100644 --- a/framework-t/api/system-current.txt +++ b/framework-t/api/system-current.txt @@ -532,6 +532,7 @@ package android.net.thread { field public static final int ERROR_RESPONSE_BAD_FORMAT = 9; // 0x9 field public static final int ERROR_TIMEOUT = 3; // 0x3 field public static final int ERROR_UNAVAILABLE = 4; // 0x4 + field public static final int ERROR_UNKNOWN = 11; // 0xb field public static final int ERROR_UNSUPPORTED_CHANNEL = 7; // 0x7 } diff --git a/thread/framework/java/android/net/thread/ThreadNetworkException.java b/thread/framework/java/android/net/thread/ThreadNetworkException.java index c5e1e971a9..4fd445b0bc 100644 --- a/thread/framework/java/android/net/thread/ThreadNetworkException.java +++ b/thread/framework/java/android/net/thread/ThreadNetworkException.java @@ -47,6 +47,7 @@ public class ThreadNetworkException extends Exception { ERROR_REJECTED_BY_PEER, ERROR_RESPONSE_BAD_FORMAT, ERROR_RESOURCE_EXHAUSTED, + ERROR_UNKNOWN, }) public @interface ErrorCode {} @@ -122,6 +123,12 @@ public class ThreadNetworkException extends Exception { */ public static final int ERROR_RESOURCE_EXHAUSTED = 10; + /** + * The operation failed because of an unknown error in the system. This typically indicates + * that the caller doesn't understand error codes added in newer Android versions. + */ + public static final int ERROR_UNKNOWN = 11; + private final int mErrorCode; /** Creates a new {@link ThreadNetworkException} object with given error code and message. */