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

Commit 5d623992 authored by Cody Kesting's avatar Cody Kesting
Browse files

Remove VcnStatusCallback#onEnteredSafemode().

This CL removes VcnStatusCallback#onEnteredSafeMode(). This method was
previously used to notify callbacks when their VCN entered Safe Mode.
However, this is not needed now that
VcnStatusCallback#onVcnStatusChanged(int) is defined.

Bug: 1597023
Test: atest FrameworksVcnTests
Change-Id: I8e47de9bf6763cd38025a552bee710673dddf843
parent 9f925c5f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.net.vcn;

/** @hide */
oneway interface IVcnStatusCallback {
    void onEnteredSafeMode();
    void onVcnStatusChanged(int statusCode);
    void onGatewayConnectionError(
            in int[] gatewayNetworkCapabilities,
+0 −20
Original line number Diff line number Diff line
@@ -427,20 +427,6 @@ public class VcnManager {
    public abstract static class VcnStatusCallback {
        private VcnStatusCallbackBinder mCbBinder;

        /**
         * Invoked when the VCN for this Callback's subscription group enters safe mode.
         *
         * <p>A VCN will be put into safe mode if any of the gateway connections were unable to
         * establish a connection within a system-determined timeout (while underlying networks were
         * available).
         *
         * @deprecated Removed in favor of {@link #onVcnStatusChanged(int)}. To be removed in a
         *     followup patch.
         * @hide
         */
        @Deprecated
        public void onEnteredSafeMode() {}

        /**
         * Invoked when status of the VCN for this callback's subscription group changes.
         *
@@ -584,12 +570,6 @@ public class VcnManager {
            mCallback = callback;
        }

        @Override
        public void onEnteredSafeMode() {
            Binder.withCleanCallingIdentity(
                    () -> mExecutor.execute(() -> mCallback.onEnteredSafeMode()));
        }

        @Override
        public void onVcnStatusChanged(@VcnStatusCode int statusCode) {
            Binder.withCleanCallingIdentity(
+0 −3
Original line number Diff line number Diff line
@@ -203,9 +203,6 @@ public class VcnManagerTest {
        IVcnStatusCallback cbBinder =
                new VcnStatusCallbackBinder(INLINE_EXECUTOR, mMockStatusCallback);

        cbBinder.onEnteredSafeMode();
        verify(mMockStatusCallback).onEnteredSafeMode();

        cbBinder.onVcnStatusChanged(VCN_STATUS_CODE_ACTIVE);
        verify(mMockStatusCallback).onVcnStatusChanged(VCN_STATUS_CODE_ACTIVE);