Fix a bug where adding a user doesn't update network allow lists

Even if there are no preferences, the allow list needs
to be updated upon adding a new user, because it's set
unconditionally when the network connects.

Adding all existing UIDs would address this issue too
and we probably want to do it, but immediately this
seems simpler.

Bug: 266136779
Test: new test for this
Change-Id: I77091a6c3d3ccf2b80ab0aaa01d09ef0df922501
This commit is contained in:
Chalard Jean 2023-01-23 16:47:43 +09:00
commit e0abd52557

View file

@ -6245,9 +6245,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
if (mOemNetworkPreferences.getNetworkPreferences().size() > 0) {
handleSetOemNetworkPreference(mOemNetworkPreferences, null);
}
if (!mProfileNetworkPreferences.isEmpty()) {
updateProfileAllowedNetworks();
}
updateProfileAllowedNetworks();
}
private void onUserRemoved(@NonNull final UserHandle user) {