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

Commit face5b6c authored by Ken Lin's avatar Ken Lin Committed by Automerger Merge Worker
Browse files

Merge "Settings crashed when changing the Screen Resolution" into udc-d1-dev am: a6f2464e

parents 6da21a67 a6f2464e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -369,6 +369,12 @@ public class ScreenResolutionFragment extends RadioButtonPickerFragment {

        private void restoreDensity() {
            final DisplayDensityUtils density = new DisplayDensityUtils(mContext);
            /* If current density is the same as a default density of other resolutions,
             * then mCurrentIndex may be out of boundary.
             */
            if (density.getDefaultDisplayDensityValues().length <= mCurrentIndex) {
                mCurrentIndex = density.getCurrentIndexForDefaultDisplay();
            }
            if (density.getDefaultDisplayDensityValues()[mCurrentIndex]
                    != density.getDefaultDensityForDefaultDisplay()) {
                density.setForcedDisplayDensity(mCurrentIndex);