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

Commit 5e500a58 authored by Sherry Huang's avatar Sherry Huang Committed by Android (Google) Code Review
Browse files

Merge "TIF: Remove duplicate cleanup" into main

parents 204dde14 71c590a9
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