OSDN Git Service

[Wi-Fi] Do not delete certs when forgetting network
authorHai Shalom <haishalom@google.com>
Thu, 7 Mar 2019 23:54:25 +0000 (15:54 -0800)
committerHai Shalom <haishalom@google.com>
Thu, 14 Mar 2019 17:45:55 +0000 (10:45 -0700)
commit236660590004487d65849ed44e4431cb038c42a0
tree789c10afbb2e816bdcca691d91257158568baf4c
parent68c7aad725f1aeb37a7b4de5accdbc725d72c131
[Wi-Fi] Do not delete certs when forgetting network

Deleting EAP Wi-Fi configuration deletes shared credentials used by other
configs. To resolve this issue the following changes were implemented:
1. When manually adding Wi-Fi certs from storage, Wi-Fi will not attempt
to delete them when network is removed.
2. When apps use WifiEnterpriseConfig#setClientKeyEntry to add certs,
they will be deleted if the network is removed.
3. Allow the user to delete Wi-Fi certs the same way that allows the
user to add them. Make the "Remove" option available, and implement key
store removal in settings.

Bug: 30248175
Test: atest WifiEnterpriseConfigTest
Test: Load certs, remove certs from credentials menu
Test: Load cert, create 2 EAP networks that use it, forget one network
Change-Id: I2015207d51188821da3397e1947e5eb6aefbf6e1
src/com/android/settings/UserCredentialsSettings.java