Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 753e63c0 authored by Etan Cohen's avatar Etan Cohen
Browse files

[WIFI] Make Aware + Connectivity agent network specifiers sensitive

Configure the Wi-Fi Aware and Wi-Fi connectivity API agent network
specifiers as sensitive. This will strip them 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: 122160111
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: I9673107a2ee13bca63539fc7dbee7f376af3ebcb
parent 3c3f264c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -181,4 +181,9 @@ public final class WifiNetworkAgentSpecifier extends NetworkSpecifier implements
        throw new IllegalStateException("WifiNetworkAgentSpecifier should never be used "
                + "for requests.");
    }

    @Override
    public NetworkSpecifier redact() {
        return null;
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -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");