summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index 75b39b261..d9abb94b2 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -2571,10 +2571,12 @@ public class WifiConfigManager {
* @param userId The identifier of the user that stopped.
*/
public void handleUserStop(int userId) {
+ if (mVerboseLoggingEnabled) {
+ Log.v(TAG, "Handling user stop for " + userId);
+ }
if (userId == mCurrentUserId && mUserManager.isUserUnlockingOrUnlocked(mCurrentUserId)) {
saveToStore(true);
- clearInternalData();
- mCurrentUserId = UserHandle.USER_SYSTEM;
+ clearInternalUserData(mCurrentUserId);
}
}
@@ -2586,6 +2588,7 @@ public class WifiConfigManager {
* - List of deleted ephemeral networks.
*/
private void clearInternalData() {
+ localLog("clearInternalData: Clearing all internal data");
mConfiguredNetworks.clear();
mDeletedEphemeralSSIDs.clear();
mScanDetailCaches.clear();
@@ -2604,12 +2607,16 @@ public class WifiConfigManager {
* removed from memory.
*/
private Set<Integer> clearInternalUserData(int userId) {
+ localLog("clearInternalUserData: Clearing user internal data for " + userId);
Set<Integer> removedNetworkIds = new HashSet<>();
// Remove any private networks of the old user before switching the userId.
for (WifiConfiguration config : getInternalConfiguredNetworks()) {
if (!config.shared && WifiConfigurationUtil.doesUidBelongToAnyProfile(
config.creatorUid, mUserManager.getProfiles(userId))) {
removedNetworkIds.add(config.networkId);
+ localLog("clearInternalUserData: removed config."
+ + " netId=" + config.networkId
+ + " configKey=" + config.configKey());
mConfiguredNetworks.remove(config.networkId);
}
}