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

Commit e5f5e820 authored by Shimeng (Simon) Wang's avatar Shimeng (Simon) Wang Committed by Android (Google) Code Review
Browse files

Merge "Prevent set mInitialScale being overridden by mDefaultScale."

parents fcc8fae9 1151fe78
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ class ZoomManager {
    }

    public final float getDefaultScale() {
        return mDefaultScale;
        return mInitialScale > 0 ? mInitialScale : mDefaultScale;
    }

    public final float getReadingLevelScale() {
@@ -1087,6 +1087,7 @@ class ZoomManager {
            float scale;
            if (mInitialScale > 0) {
                scale = mInitialScale;
                mTextWrapScale = scale;
            } else if (viewState.mViewScale > 0) {
                mTextWrapScale = viewState.mTextWrapScale;
                scale = viewState.mViewScale;
@@ -1105,7 +1106,7 @@ class ZoomManager {
            }
            boolean reflowText = false;
            if (!viewState.mIsRestored) {
                if (settings.getUseFixedViewport()) {
                if (settings.getUseFixedViewport() && mInitialScale == 0) {
                    // Override the scale only in case of fixed viewport.
                    scale = Math.max(scale, overviewScale);
                    mTextWrapScale = Math.max(mTextWrapScale, overviewScale);