Remove the usage of hidden API - setIsAvailable() from Vpn

In fact, NetworkAgent#getLegacyNetworkInfo() will call this API,
so VPN doesn't need to call it.
Remove the redundant behavior and the usage of hidden API.

Bug: 182963397
Test: m
Change-Id: I3b88f22fffde3dd4000d28342ed07209c7121a37
Merged-In: I3b88f22fffde3dd4000d28342ed07209c7121a37
  (cherry-picked from ag/13929100)
This commit is contained in:
lucaslin
2021-03-19 21:26:40 +08:00
committed by Lucas Lin
parent 4eca6d0c5c
commit 8a96b31b4c

View File

@@ -1287,7 +1287,6 @@ public class Vpn {
});
mNetworkAgent.setUnderlyingNetworks((mConfig.underlyingNetworks != null)
? Arrays.asList(mConfig.underlyingNetworks) : null);
mNetworkInfo.setIsAvailable(true);
updateState(DetailedState.CONNECTED, "agentConnect");
}