Expose constructor of Exceptions.
Exposing constructor of Exceptions for test purpose. CTS-Coverage-Bug: 224059548 BUG: 215240597 BUG: 216368595 Test: build Change-Id: I20af104a891e94873715ab46ecabc3e775638c8c
This commit is contained in:
parent
edf80c2da8
commit
e7c481452e
5 changed files with 18 additions and 9 deletions
|
|
@ -360,6 +360,7 @@ package android.net {
|
|||
}
|
||||
|
||||
public class NetworkReleasedException extends java.lang.Exception {
|
||||
ctor public NetworkReleasedException();
|
||||
}
|
||||
|
||||
public class NetworkRequest implements android.os.Parcelable {
|
||||
|
|
@ -424,6 +425,8 @@ package android.net {
|
|||
}
|
||||
|
||||
public final class QosCallbackException extends java.lang.Exception {
|
||||
ctor public QosCallbackException(@NonNull String);
|
||||
ctor public QosCallbackException(@NonNull Throwable);
|
||||
}
|
||||
|
||||
public abstract class QosFilter {
|
||||
|
|
@ -469,9 +472,11 @@ package android.net {
|
|||
}
|
||||
|
||||
public class SocketLocalAddressChangedException extends java.lang.Exception {
|
||||
ctor public SocketLocalAddressChangedException();
|
||||
}
|
||||
|
||||
public class SocketNotBoundException extends java.lang.Exception {
|
||||
ctor public SocketNotBoundException();
|
||||
}
|
||||
|
||||
public final class StaticIpConfiguration implements android.os.Parcelable {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ package android.net;
|
|||
|
||||
import android.annotation.SystemApi;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
|
||||
/**
|
||||
* Indicates that the {@link Network} was released and is no longer available.
|
||||
*
|
||||
|
|
@ -25,7 +27,7 @@ import android.annotation.SystemApi;
|
|||
*/
|
||||
@SystemApi
|
||||
public class NetworkReleasedException extends Exception {
|
||||
/** @hide */
|
||||
@VisibleForTesting
|
||||
public NetworkReleasedException() {
|
||||
super("The network was released and is no longer available");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ import android.annotation.NonNull;
|
|||
import android.annotation.SystemApi;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
|
|
@ -94,16 +96,12 @@ public final class QosCallbackException extends Exception {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public QosCallbackException(@NonNull final String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public QosCallbackException(@NonNull final Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ package android.net;
|
|||
|
||||
import android.annotation.SystemApi;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
|
||||
/**
|
||||
* Thrown when the local address of the socket has changed.
|
||||
*
|
||||
|
|
@ -25,7 +27,7 @@ import android.annotation.SystemApi;
|
|||
*/
|
||||
@SystemApi
|
||||
public class SocketLocalAddressChangedException extends Exception {
|
||||
/** @hide */
|
||||
@VisibleForTesting
|
||||
public SocketLocalAddressChangedException() {
|
||||
super("The local address of the socket changed");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ package android.net;
|
|||
|
||||
import android.annotation.SystemApi;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
|
||||
/**
|
||||
* Thrown when a previously bound socket becomes unbound.
|
||||
*
|
||||
|
|
@ -25,7 +27,7 @@ import android.annotation.SystemApi;
|
|||
*/
|
||||
@SystemApi
|
||||
public class SocketNotBoundException extends Exception {
|
||||
/** @hide */
|
||||
@VisibleForTesting
|
||||
public SocketNotBoundException() {
|
||||
super("The socket is unbound");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue