commit | 6cf0e550c7468d43fe5e6b5100e54756dd68180a | [log] [tgz] |
---|---|---|
author | markchien <markchien@google.com> | Fri Dec 06 15:24:53 2019 +0800 |
committer | markchien <markchien@google.com> | Tue Jan 07 21:29:52 2020 +0800 |
tree | c88902a609825ad08c5002fef0a3d5d5e055fe94 | |
parent | b2bb37098f8336bde80164979fdb66955abd732a [diff] [blame] |
Fix some @hide usage in Tethering Using alternative way to replace some @hide API. Bug: 144814072 Test: build, flash, boot atest TetheringTests Change-Id: I1e12d69db1ad91dff553e142e17c6a70808e1639
diff --git a/Tethering/src/android/net/util/TetheringUtils.java b/Tethering/src/android/net/util/TetheringUtils.java index 2fb73ce..fa543bd 100644 --- a/Tethering/src/android/net/util/TetheringUtils.java +++ b/Tethering/src/android/net/util/TetheringUtils.java
@@ -39,4 +39,11 @@ */ public static native void setupRaSocket(FileDescriptor fd, int ifIndex) throws SocketException; + + /** + * Read s as an unsigned 16-bit integer. + */ + public static int uint16(short s) { + return s & 0xffff; + } }