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

Commit ff3649cd authored by Chiachang Wang's avatar Chiachang Wang Committed by Automerger Merge Worker
Browse files

Merge "Update to positive logic to better match the method naming" am:...

Merge "Update to positive logic to better match the method naming" am: 1c7bc039 am: a7136c63 am: 50d0fa47

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450336

Change-Id: I2e1203c0864e04c1e0229ef4a8727a0719a3d139
parents 22098057 50d0fa47
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -380,8 +380,8 @@ public class Vpn {
            }
        }

        public boolean checkInterfacePresent(final Vpn vpn, final String iface) {
            return vpn.jniCheck(iface) == 0;
        public boolean isInterfacePresent(final Vpn vpn, final String iface) {
            return vpn.jniCheck(iface) != 0;
        }
    }

@@ -2995,7 +2995,7 @@ public class Vpn {
                    checkInterruptAndDelay(false);

                    // Check if the interface is gone while we are waiting.
                    if (mDeps.checkInterfacePresent(Vpn.this, mConfig.interfaze)) {
                    if (!mDeps.isInterfacePresent(Vpn.this, mConfig.interfaze)) {
                        throw new IllegalStateException(mConfig.interfaze + " is gone");
                    }

+1 −1
Original line number Diff line number Diff line
@@ -1263,7 +1263,7 @@ public class VpnTest {
        }

        @Override
        public boolean checkInterfacePresent(final Vpn vpn, final String iface) {
        public boolean isInterfacePresent(final Vpn vpn, final String iface) {
            return true;
        }
    }