[WIFI] Make Aware + Connectivity agent network specifiers sensitive

Configure the Wi-Fi Aware agent network
specifier as sensitive. This will strip it out from the
network capabilities before the capabilities are forwarded to the
app.

Necessary since the agent network specifier contains information
which the apps should not have.

Bug: 161853197
Bug: 161370134
Test: atest ConnectivityServiceTest (frameworks/base/tests/net)
Test: atest frameworks/base/tests/net
Test: atest frameworks/opt/net/wifi/tests/wifitests
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks/opt/net/ethernet/tests
Test: atest android.net.cts - some flakiness!
Test: act.py ThroughputTest
Test: act.py DataPathTest
Test: atest SingleDeviceTest (cts)
Change-Id: Ia6adf2afa0f2052dc46a504ceb3e5aaba591aab8
Merged-In: I9673107a2ee13bca63539fc7dbee7f376af3ebcb
This commit is contained in:
Etan Cohen
2018-12-30 18:00:37 -08:00
committed by Chiachang Wang
parent 9b1d701af4
commit 7f60f432fb

View File

@@ -149,6 +149,11 @@ public class WifiAwareAgentNetworkSpecifier extends NetworkSpecifier implements
"WifiAwareAgentNetworkSpecifier should not be used in network requests");
}
@Override
public NetworkSpecifier redact() {
return null;
}
private void initialize() {
try {
mDigester = MessageDigest.getInstance("SHA-256");