WifiConfigStore: Encrypt credentials for networks (4/4)

Add a setting to turn on/off encryption. This global setting will be
turned on for devices which require encrypted credentials.
We don't need to support flipping the global settings back n forth.
Only needs to support the one way toggle from off
to on once for the lifetime of the device.

Bug: 140485110
Test: atest com.android.server.wifi
Test: Manual verification
- Store a PSK network config on older build
- Upgrade to build with this CL
- adb shell settings put global niap_mode 1
- Ensured that the psk was read correctly on upgrade
- Ensured that the psk was encrypted when stored on disk after upgrade
Change-Id: Ibabe0814bfc42a7bf610d18e89a7b82bacfdfeed
Merged-In: Ibabe0814bfc42a7bf610d18e89a7b82bacfdfeed
16 files changed
tree: 3efb794908c212dac5f48bd5be193f0bb3c6b671
  1. service/
  2. PREUPLOAD.cfg