Merge changes from topic "vcn-status-changed" am: 46c10cbc4d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1633026 Change-Id: I09c2595dcdc111087894d4c3da95310d9dd91be8
This commit is contained in:
@@ -25723,7 +25723,7 @@ package android.net.vcn {
|
|||||||
public abstract static class VcnManager.VcnStatusCallback {
|
public abstract static class VcnManager.VcnStatusCallback {
|
||||||
ctor public VcnManager.VcnStatusCallback();
|
ctor public VcnManager.VcnStatusCallback();
|
||||||
method public abstract void onGatewayConnectionError(@NonNull int[], int, @Nullable Throwable);
|
method public abstract void onGatewayConnectionError(@NonNull int[], int, @Nullable Throwable);
|
||||||
method public abstract void onVcnStatusChanged(int);
|
method public abstract void onStatusChanged(int);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ public class VcnManager {
|
|||||||
* @param statusCode the code for the status change encountered by this {@link
|
* @param statusCode the code for the status change encountered by this {@link
|
||||||
* VcnStatusCallback}'s subscription group.
|
* VcnStatusCallback}'s subscription group.
|
||||||
*/
|
*/
|
||||||
public abstract void onVcnStatusChanged(@VcnStatusCode int statusCode);
|
public abstract void onStatusChanged(@VcnStatusCode int statusCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked when a VCN Gateway Connection corresponding to this callback's subscription group
|
* Invoked when a VCN Gateway Connection corresponding to this callback's subscription group
|
||||||
@@ -476,7 +476,7 @@ public class VcnManager {
|
|||||||
* and there is a VCN active for its specified subscription group (this may happen after the
|
* and there is a VCN active for its specified subscription group (this may happen after the
|
||||||
* callback is registered).
|
* callback is registered).
|
||||||
*
|
*
|
||||||
* <p>{@link VcnStatusCallback#onVcnStatusChanged(int)} will be invoked on registration with the
|
* <p>{@link VcnStatusCallback#onStatusChanged(int)} will be invoked on registration with the
|
||||||
* current status for the specified subscription group's VCN. If the registrant is not
|
* current status for the specified subscription group's VCN. If the registrant is not
|
||||||
* privileged for this subscription group, {@link #VCN_STATUS_CODE_NOT_CONFIGURED} will be
|
* privileged for this subscription group, {@link #VCN_STATUS_CODE_NOT_CONFIGURED} will be
|
||||||
* returned.
|
* returned.
|
||||||
@@ -580,7 +580,7 @@ public class VcnManager {
|
|||||||
@Override
|
@Override
|
||||||
public void onVcnStatusChanged(@VcnStatusCode int statusCode) {
|
public void onVcnStatusChanged(@VcnStatusCode int statusCode) {
|
||||||
Binder.withCleanCallingIdentity(
|
Binder.withCleanCallingIdentity(
|
||||||
() -> mExecutor.execute(() -> mCallback.onVcnStatusChanged(statusCode)));
|
() -> mExecutor.execute(() -> mCallback.onStatusChanged(statusCode)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(b/180521637): use ServiceSpecificException for safer Exception 'parceling'
|
// TODO(b/180521637): use ServiceSpecificException for safer Exception 'parceling'
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class VcnManagerTest {
|
|||||||
new VcnStatusCallbackBinder(INLINE_EXECUTOR, mMockStatusCallback);
|
new VcnStatusCallbackBinder(INLINE_EXECUTOR, mMockStatusCallback);
|
||||||
|
|
||||||
cbBinder.onVcnStatusChanged(VCN_STATUS_CODE_ACTIVE);
|
cbBinder.onVcnStatusChanged(VCN_STATUS_CODE_ACTIVE);
|
||||||
verify(mMockStatusCallback).onVcnStatusChanged(VCN_STATUS_CODE_ACTIVE);
|
verify(mMockStatusCallback).onStatusChanged(VCN_STATUS_CODE_ACTIVE);
|
||||||
|
|
||||||
cbBinder.onGatewayConnectionError(
|
cbBinder.onGatewayConnectionError(
|
||||||
UNDERLYING_NETWORK_CAPABILITIES,
|
UNDERLYING_NETWORK_CAPABILITIES,
|
||||||
|
|||||||
Reference in New Issue
Block a user