From 974fc878527ab716f82c8c9f89146be2ab914727 Mon Sep 17 00:00:00 2001 From: Chiachang Wang Date: Mon, 28 Sep 2020 10:31:49 +0800 Subject: [PATCH] Update to positive logic to better match the method naming The method checkInterfacePresent seems that should return if the interface is present or not, but it actually return an opposite result. It may confuse the caller. E.g. The override method in VpnTest assume it always returns true in the test. It will fail the vpn start flow due to interface gone. Bug: 169215213 Test: atest FrameworksNetTess Change-Id: I3e9a64f0900336b8205674b94db68f090b4e9ff9 --- tests/net/java/com/android/server/connectivity/VpnTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/net/java/com/android/server/connectivity/VpnTest.java b/tests/net/java/com/android/server/connectivity/VpnTest.java index f2b7c1ea2b..1df510987d 100644 --- a/tests/net/java/com/android/server/connectivity/VpnTest.java +++ b/tests/net/java/com/android/server/connectivity/VpnTest.java @@ -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; } }