Immediately redact WifiInfo objects.

Currently, WifiInfo objects are redacted only when they are
parcelled over to another process. This type of "delayed fuse"
redaction is confusing and difficult to work with. In particular,
since parcelling does not transfer the required redactions,
parcelling a NetworkCapabilities object to another process, and
then performing a defensive copy, will immediately trigger
redaction.

This CL modifies WifiInfo so that calling makeCopy() will
immediately redact its fields instead of just remembering to
redact its fields when the object is later parcelled.

This CL does not touch the tests. This is to ensure that the
modified code passes the existing tests unmodified. These tests
check that the parcelled WifiInfo is correctly redacted. The next
CL in the topic modifies them to ensure that the object is
correctly redacted as soon as makeCopy() is called.

Bug: 183938194
Test: atest FrameworksWifiApiTests
Change-Id: I081566110960327ea4607da11515fdc23e38da17
1 file changed