Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 821b4a34 authored by Sherry Huang's avatar Sherry Huang
Browse files

TIF: update condition in startUser

The current condition of `parentInfo.id == mCurrentUserId` should be
removed because this condition assumes that user can only switch to kid
user from main user. This condition leads to profile switching between
kid user 1 to kid user 2 to fail, leading to functional issues. As all
adult profiles all have user id of 0, there is no need to check the
value of profile's parent id either.

Bug: b/426052909
Test: verified by partner
Flag: EXEMPT bugfix only
Change-Id: I8d60c98735d250558fb0c6f4491ace9f0e90bb37
parent 37a4e048
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -608,10 +608,9 @@ public final class TvInputManagerService extends SystemService {
                // user already started
                return;
            }
            UserInfo userInfo = mUserManager.getUserInfo(userId);
            UserInfo parentInfo = mUserManager.getProfileParent(userId);
            // User is guaranteed to be a profile here as we have checked before calling startUser
            if (parentInfo != null && parentInfo.id == mCurrentUserId) {
            if (parentInfo != null) {
                int prevUserId = mCurrentUserId;
                mCurrentUserId = userId;
                // only the children of the current user can be started in background