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

Commit 99988dcd authored by Yasin Kilicdere's avatar Yasin Kilicdere Committed by Android (Google) Code Review
Browse files

Merge "Remove UserController.sethasTopUi because it doesn't have any effect." into main

parents ef4e9d5d 8baddce8
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -2059,9 +2059,6 @@ class UserController implements Handler.Callback {
            mTargetUserId = targetUserId;
            userSwitchUiEnabled = mUserSwitchUiEnabled;
        }
        if (android.multiuser.Flags.useAllCpusDuringUserSwitch()) {
            mInjector.setHasTopUi(true);
        }
        if (userSwitchUiEnabled) {
            UserInfo currentUserInfo = getUserInfo(currentUserId);
            Pair<UserInfo, UserInfo> userNames = new Pair<>(currentUserInfo, targetUserInfo);
@@ -2130,9 +2127,6 @@ class UserController implements Handler.Callback {
    }

    private void endUserSwitch() {
        if (android.multiuser.Flags.useAllCpusDuringUserSwitch()) {
            mInjector.setHasTopUi(false);
        }
        final int nextUserId;
        synchronized (mLock) {
            nextUserId = ObjectUtils.getOrElse(mPendingTargetUserIds.poll(), UserHandle.USER_NULL);
@@ -3816,15 +3810,6 @@ class UserController implements Handler.Callback {
            getSystemServiceManager().onUserStarting(TimingsTraceAndSlog.newAsyncLog(), userId);
        }

        void setHasTopUi(boolean hasTopUi) {
            try {
                Slogf.i(TAG, "Setting hasTopUi to " + hasTopUi);
                mService.setHasTopUi(hasTopUi);
            } catch (RemoteException e) {
                Slogf.e(TAG, "Failed to allow using all CPU cores", e);
            }
        }

        void onSystemUserVisibilityChanged(boolean visible) {
            getUserManagerInternal().onSystemUserVisibilityChanged(visible);
        }