KeyStore: stop using state()

Change-Id: Ia8fc945666c59c0b9a9bd6f890cc2a6b8859e1d4
Fix Settings app crash after enabled multi-user

Bug: 8128225
Change-Id: I2918a5ec36e861a1ce4b2e67cf7607929732a7bf
Update enterprise API usage

Also, remove the unnecessary keystore lock/unlock checks since these
are now controlled at lockscreen

Change-Id: If65c4029d4cf2b8377fbc3512c9f691572125995
Allow only valid EAP configs

We allow configuring all possible EAP fields today even though
some of the configs make no sense and will not result in a
successful connection.

Allow only support configs for various EAP methods

Change-Id: I2e3e8d4d6203acb2eac8cd645df39e1a9ca579ab
Fix EAP field display for a new network

We now hide certain EAP fields based on the type chosen. For a
new network, we should set a default and handle this the same
way

Change-Id: I9c8605694ba51bc588a49f711dcf31517ea3f6e4
Use updated enterprise API

Change-Id: If41fad5fae5864555bb1de3fc99130682b1cdff1
Prevent cursor from causing global reference leaks.

To fix this the ContentQueryMap needs to be closed
when onStop is called so any global references can
be reclaimed.

Change-Id: I0c679c10b0d75ab0aac2fe499563c57d934e318a
avoid stopping app in case of accessing empty db

When accessing empty database, Setting App is stopped, sometimes.
To avoid stopping app, check null for cursor

Change-Id: I71ec067f502d12a9215a9abdbe9e23fc07af17bb
Fix not updating error message when authentication fails

If attempt to configure the first network fails, AccessPoints fails to
update error message because it only checks the error code if it is not
active.

With this change, user may see saved network message for a second
because SupplicantStateTracker retries on authentication failure so
intermediate status is displayed between each trial.

Bug: 8284024
Change-Id: I8b976b03878e27e46726ee8a176f131115b7a409