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

Commit 1313feec authored by Charles Chen's avatar Charles Chen
Browse files

Attempt to fix performance regression since 5164254

The wrong condition in StatusBarManagerService#disabledLocked, which causes
CommandQueue#disable(disable1, disable2, true) dispatches to many callbacks
and draw many unnecessary frames. Also add a check to prevent from setting
notification disable flags on external displays since we don't enable
notifications on external displays now.

Fixes: 120625457
Test: atest
google/perf/jank/SystemUI/UbSystemUIJankTests:android.platform.systemui.tests.jank.SystemUiJankTests#testLaunchSettings

Change-Id: I2092ee5b2df1c9116c306af526add724e64209aa
parent 7f8c5ac3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -718,12 +718,12 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D
            disabledData += " }";
            final UiState state = getUiState(displayId);

            Log.d(TAG, "disabledlocked (b/113914868): displayId=" + displayId + "net1=" + net1
            Log.d(TAG, "disabledlocked (b/113914868): displayId=" + displayId + ", net1=" + net1
                    + ", mDisabled1=" + state.mDisabled1 + ", token=" + token
                    + ", mDisableRecords=" + mDisableRecords.size() + " => " + disabledData);
        }
        final UiState state = getUiState(displayId);
        if (state.disableEquals(net1, net2)) {
        if (!state.disableEquals(net1, net2)) {
            state.setDisabled(net1, net2);
            mHandler.post(() -> mNotificationDelegate.onSetDisabled(net1));
            if (mBar != null) {