Fix WifiMetrics connection auth type

Use ScanResult instead of WifiConfiguration to get the Auth type, as
WifiConfiguration's allowedAuthAlgorithms is not valid at the beginning
of a connection attempt.
Also refactored metric getting from ScanResults and NetworkDetails into
their own helper functions.

BUG=25691077

Change-Id: I528a1c76204b5197815ad3836d743513f89bc9ca
1 file changed
tree: 50ea13c3e5b7c2280b857f9e46dcca652b2575ab
  1. service/
  2. tests/