OSDN Git Service

DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
authorHugo Benichi <hugobenichi@google.com>
Thu, 13 Oct 2016 00:26:01 +0000 (09:26 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Thu, 8 Dec 2016 08:13:32 +0000 (17:13 +0900)
commit4104ff922040540b73f79f0f89dab3ae42b50462
tree87e3e451398f704b631c2258f30c4788bacb3a81
parent0668a61d82a424fb3714b6222f0e4213c18fc7b1
DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters

This patch adds a getUint8 getter for ByteBuffers and changes ApfFilter
to make uses of getUint8/16/32 everywhere.

The return types of getUint16 is also changed from long to int, which
will expand gracefully to long as an unsigned int as it is guaranteed to
be positive after getUint16.

Test: ApfTest passes

(cherry picked from commit 995dd94673005b43d32456e2de5fda0090b23576)

Change-Id: I606ebc5aedfcacde400d27cc6bc37145769b122c
services/net/java/android/net/apf/ApfFilter.java