Build ScanResult.capabilities from IE and capability mask

This take use of InformationElementUtil.Capabilities.buildCapabilities
to build ScanResult.capabilities instead of asking wpa_supplicant for
a FLAG string.

With this change, getRawScanResults() no longer depends on
wpa_supplicant to parse IE elements and provide FLAG string.

This helps us integrate wificond scanning to java framework because
in this way wificond just needs to provide capability mask and raw
IE array, instead of parsing IE array ahead.

BUG=31157181
TEST=compile and manual test
TEST=
example:
flag string before change:[WPA2-PSK-CCMP][WPS][ESS]
flag string after change:[WPA2-PSK][ESS]
Since we only care PSK, WEP and EAP keywords, these strings can be seen
as identical.

Change-Id: I97fe527416c3678d49b6516f2cac1ddbdf4b29bb
1 file changed
tree: a0d899235972487596638f67b9ef5604a6b1efe8
  1. service/