Do not remove profile network preference for different uids
Multiple enterprise slice can be setup within single user profile based on different uids. So do not remove profile network preference with same user profile but with different uids Bug: 229644102 Test: manual system test and ConnectivityServciceTest Change-Id: I897b643e01240958fff575de9e15182069efc698
This commit is contained in:
parent
95e02c5d5a
commit
9cc129f37d
1 changed files with 36 additions and 18 deletions
|
|
@ -10833,10 +10833,20 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
private void handleSetProfileNetworkPreference(
|
||||
@NonNull final List<ProfileNetworkPreferenceList.Preference> preferenceList,
|
||||
@Nullable final IOnCompleteListener listener) {
|
||||
/*
|
||||
* handleSetProfileNetworkPreference is always called for single user.
|
||||
* preferenceList only contains preferences for different uids within the same user
|
||||
* (enforced by getUidListToBeAppliedForNetworkPreference).
|
||||
* Clear all the existing preferences for the user before applying new preferences.
|
||||
*
|
||||
*/
|
||||
mProfileNetworkPreferences = mProfileNetworkPreferences.clearUser(
|
||||
preferenceList.get(0).user);
|
||||
for (final ProfileNetworkPreferenceList.Preference preference : preferenceList) {
|
||||
validateNetworkCapabilitiesOfProfileNetworkPreference(preference.capabilities);
|
||||
mProfileNetworkPreferences = mProfileNetworkPreferences.plus(preference);
|
||||
}
|
||||
|
||||
removeDefaultNetworkRequestsForPreference(PREFERENCE_ORDER_PROFILE);
|
||||
addPerAppDefaultNetworkRequests(
|
||||
createNrisFromProfileNetworkPreferences(mProfileNetworkPreferences));
|
||||
|
|
|
|||
Loading…
Reference in a new issue