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

Commit 8d0c64de authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

Don't query active mode after setting desired mode specs

We don't need to query the active display mode after
setting desired mode specs. If the mode changes
the onModeChanged() will be called and we'll update
the state.

Bug: 180090041
Test: presubmit
Test: flashed on device and did a mode switch
Test: atest DisplayTest
Change-Id: Ie77e1caf29fecfc4e43d6d3b6ec73c9bfdfc8a5c
parent 254351a6
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -850,14 +850,6 @@ final class LocalDisplayAdapter extends DisplayAdapter {
            // Do not lock when calling these SurfaceControl methods because they are sync
            // operations that may block for a while when setting display power mode.
            mSurfaceControlProxy.setDesiredDisplayModeSpecs(displayToken, modeSpecs);

            final int sfActiveModeId = mSurfaceControlProxy
                    .getDynamicDisplayInfo(displayToken).activeDisplayModeId;
            synchronized (getSyncRoot()) {
                if (updateActiveModeLocked(sfActiveModeId)) {
                    updateDeviceInfoLocked();
                }
            }
        }

        @Override