diff options
author | Aaron Huang <huangaaron@google.com> | 2020-03-20 11:09:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-20 11:09:42 +0000 |
commit | fcb793e158c1d1b9223e2e743528f3a4782a60e1 (patch) | |
tree | 4a2325a31db52bfb4e30e244560636ca4ca87d8a | |
parent | ca2b551581fefb12d0c0f17585d66241b7f4d536 (diff) | |
parent | ef98fa2b5c5f63371c7b6b4356187240e19c20a8 (diff) |
Merge "API review: use getter to access field" into rvc-dev
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index f8b9f9bad..6fab0ae90 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -1364,7 +1364,7 @@ public class ClientModeImpl extends StateMachine { throws InvalidPacketException { try { InetAddress gateway = NetUtils.selectBestRoute( - mLinkProperties.getRoutes(), packetData.dstAddress).getGateway(); + mLinkProperties.getRoutes(), packetData.getDstAddress()).getGateway(); String dstMacStr = macAddressFromRoute(gateway.getHostAddress()); return NativeUtil.macAddressToByteArray(dstMacStr); } catch (NullPointerException | IllegalArgumentException e) { @@ -1374,9 +1374,9 @@ public class ClientModeImpl extends StateMachine { private static int getEtherProtoForKeepalive(KeepalivePacketData packetData) throws InvalidPacketException { - if (packetData.dstAddress instanceof Inet4Address) { + if (packetData.getDstAddress() instanceof Inet4Address) { return OsConstants.ETH_P_IP; - } else if (packetData.dstAddress instanceof Inet6Address) { + } else if (packetData.getDstAddress() instanceof Inet6Address) { return OsConstants.ETH_P_IPV6; } else { throw new InvalidPacketException(InvalidPacketException.ERROR_INVALID_IP_ADDRESS); @@ -1394,7 +1394,7 @@ public class ClientModeImpl extends StateMachine { dstMac = getDstMacForKeepalive(packetData); proto = getEtherProtoForKeepalive(packetData); } catch (InvalidPacketException e) { - return e.error; + return e.getError(); } int ret = mWifiNative.startSendingOffloadedPacket( |