Fix an infinite loop

If the top bit is set, then >>= propagates it. That means
|bitmask| is never 0, and this is an infinite loop.

A followup will move this method to frameworks/libs/net
and add tests for it.

Test: FrameworksNetTests
Change-Id: I28a0a74be41f6f29b796b1c76e404ecc21f810c6
1 file changed