diff options
| author | 2020-10-07 10:19:15 +0000 | |
|---|---|---|
| committer | 2020-10-07 10:19:15 +0000 | |
| commit | d2ca3eb2f03645b4eead5901cd6cf8adc4bfe9b7 (patch) | |
| tree | d92e0bc746ceefa3ce49b7e383cfa52474cec928 /services | |
| parent | f1cc387293725d1962ea0ea25ebe0d0564b2f00f (diff) | |
| parent | ff3649cd5dc26d7ffd8fd98ad6dd406a656bf036 (diff) | |
Merge "Update to positive logic to better match the method naming" am: 1c7bc039ea am: a7136c6340 am: 50d0fa47ee am: ff3649cd5d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450336
Change-Id: I111b7fa8eaecbec7e65357f7b9aa9b3f369d00c9
Diffstat (limited to 'services')
| -rw-r--r-- | services/core/java/com/android/server/connectivity/Vpn.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java index 3873f3bb83fa..eb67a09d6492 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -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"); } |