p2p: fix wrong conversion from byte to int in wfdinfo
The wfd info is coverted from byte to int.
Java only has sign byte, and it would treat the first bit as sign bit.
For ctrl port with sign bit set, e.g. 0xC000, it will be converted to
-16384, instead of 49152.
This should use mask 0xFF to against sign extension.
Add a unit test for this wrong conversion condition.
Bug: 122447853
Test: Unit test - atest frameworks/opt/net/wifi/tests/wifitests
Change-Id: I5d1a3ba24db0ae57a465fb873f908bb72db038ee
2 files changed