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

Commit ab68c9fe authored by Kriti Dang's avatar Kriti Dang
Browse files

Covert the mActiveSfDisplayModeAtStartId to framework mode id.

Bug: 213463860
Test: adb shell cmd display get-active-display-mode-at-start 0 returns
correct mode

Change-Id: I3b7b6d5554b914130b2201af1f643fc726b4b0c4
parent 94f9574f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ final class LocalDisplayAdapter extends DisplayAdapter {
        private int mUserPreferredModeId = INVALID_MODE_ID;
        // This is used only for the purpose of testing, to verify if the mode was correct when the
        // device started or booted.
        private int mActiveDisplayModeAtStartId = INVALID_MODE_ID;
        private int mActiveSfDisplayModeAtStartId = INVALID_MODE_ID;
        private Display.Mode mUserPreferredMode;
        private int mActiveModeId = INVALID_MODE_ID;
        private boolean mDisplayModeSpecsInvalid;
@@ -241,7 +241,7 @@ final class LocalDisplayAdapter extends DisplayAdapter {
            mSidekickInternal = LocalServices.getService(SidekickInternal.class);
            mBacklightAdapter = new BacklightAdapter(displayToken, isFirstDisplay,
                    mSurfaceControlProxy);
            mActiveDisplayModeAtStartId = dynamicInfo.activeDisplayModeId;
            mActiveSfDisplayModeAtStartId = dynamicInfo.activeDisplayModeId;
        }

        @Override
@@ -255,7 +255,7 @@ final class LocalDisplayAdapter extends DisplayAdapter {
         */
        @Override
        public Display.Mode getActiveDisplayModeAtStartLocked() {
            return findMode(mActiveDisplayModeAtStartId);
            return findMode(findMatchingModeIdLocked(mActiveSfDisplayModeAtStartId));
        }

        /**