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

Commit b45934a2 authored by Jay Aliomer's avatar Jay Aliomer
Browse files

Performance regression on window switching

window manager deleted cache everytime the battery manager updated.
We only want to do that when there is a config change

Test: atest UiModeManagerServiceTest

Fixes: 145161355
Fixes: 	145694649
Change-Id: Ia05fcfed2c5991dbe79d713c4e9f8d98831f9761
parent 679025e6
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -866,14 +866,13 @@ final class UiModeManagerService extends SystemService {
        if (!mHoldingConfiguration) {
            mConfiguration.uiMode = uiMode;
        }
        // load splash screen instead of screenshot
        mWindowManager.clearSnapshotCache();
    }

    private void sendConfigurationLocked() {
        if (mSetUiMode != mConfiguration.uiMode) {
            mSetUiMode = mConfiguration.uiMode;

            // load splash screen instead of screenshot
            mWindowManager.clearSnapshotCache();
            try {
                ActivityTaskManager.getService().updateConfiguration(mConfiguration);
            } catch (RemoteException e) {