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

Commit 8baddce8 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Remove UserController.sethasTopUi because it doesn't have any effect.

These lines were added in ag/25202314 but they don't have any effect
due to ag/14508386.

Bug: 308106771
Flag: ACONFIG android.multiuser.allow_using_all_cpu_cores_during_a_user_switch DEVELOPMENT
Test: NA
Change-Id: Ie27a09f3b7a7c30bfe04e8188143ceac441c4ba7
parent 9481b2b3
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -2030,9 +2030,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);
@@ -2101,9 +2098,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);
@@ -3787,15 +3781,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);
        }