Merge "Always set NetworkInfo objects to available."

This commit is contained in:
Lorenzo Colitti
2020-01-23 03:29:58 +00:00
committed by Android (Google) Code Review

View File

@@ -304,7 +304,10 @@ public abstract class NetworkAgent {
private static NetworkInfo getLegacyNetworkInfo(final NetworkAgentConfig config) {
// The subtype can be changed with (TODO) setLegacySubtype, but it starts
// with the type and an empty description.
return new NetworkInfo(config.legacyType, config.legacyType, config.legacyTypeName, "");
final NetworkInfo ni = new NetworkInfo(config.legacyType, config.legacyType,
config.legacyTypeName, "");
ni.setIsAvailable(true);
return ni;
}
/**