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

Commit 71c590a9 authored by Sherry Huang's avatar Sherry Huang
Browse files

TIF: Remove duplicate cleanup

There were duplicate calls made to disconnect kid profile when switching
back to user. This code change takes them out and makes a note on the
clean up for all running profiles to avoid confusion.

Bug: b/408900599
Test: manual on TV u branch
Flag: EXEMPT remove dup
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:575c33b90b526dd069dcb61237a818877bf25630)
Merged-In: I7a1bc9960290b32379399ee49441196750db3b81
Change-Id: I7a1bc9960290b32379399ee49441196750db3b81
parent 31af15fb
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -655,19 +655,18 @@ public final class TvInputManagerService extends SystemService {
                return;
            }

            // NOTE: The switchUser() function is currently only used when switching from a kid's
            // profile to the parent's (system) user.
            // Cleanup for the single running kid's profile is currently handled in stopUser().
            // This code includes cleanup logic for future multi-profile support.
            for (int runningId : mRunningProfiles) {
                releaseSessionOfUserLocked(runningId);
                cleanUpHdmiDevices(runningId);
                unbindServiceOfUserLocked(runningId);
            }
            mRunningProfiles.clear();

            int prevUserId = mCurrentUserId;
            mCurrentUserId = userId;

            releaseSessionOfUserLocked(prevUserId);
            cleanUpHdmiDevices(prevUserId);
            unbindServiceOfUserLocked(prevUserId);

            buildTvInputListLocked(mCurrentUserId, null);
            buildTvContentRatingSystemListLocked(mCurrentUserId);
            mMessageHandler