Merge "Fix profile removed broadcast being sent for non-profile user"

This commit is contained in:
Cynthia Wasonga
2022-11-09 07:50:20 +00:00
committed by Android (Google) Code Review

View File

@@ -5248,7 +5248,8 @@ public class UserManagerService extends IUserManager.Stub {
Slog.w(LOG_TAG, "Unable to notify AppOpsService of removing user.", e);
}
if (userData.info.profileGroupId != UserInfo.NO_PROFILE_GROUP_ID) {
if (userData.info.profileGroupId != UserInfo.NO_PROFILE_GROUP_ID
&& userData.info.isProfile()) {
sendProfileRemovedBroadcast(userData.info.profileGroupId, userData.info.id,
userData.info.userType);
}