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
This commit is contained in:
lucaslin
2021-03-19 21:26:40 +08:00
committed by Lucas Lin
parent a95de94fd4
commit 02ec9e9d4a

View File

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