ConfigBuilder: only set anonymous identity for EAP-TLS/TTLS configurations

Modify the logic in ConfigBuilder.buildConfig() so that the anonymous
identity field is only set for EAP-TLS/TTLS configurations.

WPA supplicant will use this field to send the NAI realm to the EAP
server in its EAP Identity Response packet, which is necessary for
AAA routing purposes. See the comments in the new
setAnonymousIdentityToNaiRealm() method for details.

While there, move the setting of the CA Certificate field
of the configuration's enterprise config into buildTTLSConfig() and
buildTLSConfig(), since this field is only needed for those two
protocols.

BUG: 29356519
TEST: Connected successfully to the AT&T, Boingo, and GlobalReach Passpoint
      APs in the lab.

Change-Id: Idf55cd92173c0543e5426d6145ce472b5894466b
1 file changed
tree: 174b4abeba3eec9576a153042a8ea876d932237f
  1. service/