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

Commit 75d67f49 authored by Tyler Freeman's avatar Tyler Freeman Committed by Android (Google) Code Review
Browse files

Merge "fix(magnification settings): reload strings when language changes" into udc-dev

parents a90801f5 231bcf88
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -463,13 +463,17 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
        if ((configDiff & ActivityInfo.CONFIG_UI_MODE) != 0
                || (configDiff & ActivityInfo.CONFIG_ASSETS_PATHS) != 0
                || (configDiff & ActivityInfo.CONFIG_FONT_SCALE) != 0
                || (configDiff & ActivityInfo.CONFIG_LOCALE) != 0
                || (configDiff & ActivityInfo.CONFIG_DENSITY) != 0) {
            // We listen to following config changes to trigger layout inflation:
            // CONFIG_UI_MODE: theme change
            // CONFIG_ASSETS_PATHS: wallpaper change
            // CONFIG_FONT_SCALE: font size change
            // CONFIG_LOCALE: language change
            // CONFIG_DENSITY: display size change

            mParams.accessibilityTitle = getAccessibilityWindowTitle(mContext);

            boolean showSettingPanelAfterThemeChange = mIsVisible;
            hideSettingPanel(/* resetPosition= */ false);
            inflateView();
@@ -490,11 +494,6 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
                    + mDraggableWindowBounds.top;
            return;
        }

        if ((configDiff & ActivityInfo.CONFIG_LOCALE) != 0) {
            updateAccessibilityWindowTitle();
            return;
        }
    }

    private void onWindowInsetChanged() {
@@ -515,13 +514,6 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
        }
    }

    private void updateAccessibilityWindowTitle() {
        mParams.accessibilityTitle = getAccessibilityWindowTitle(mContext);
        if (mIsVisible) {
            mWindowManager.updateViewLayout(mSettingView, mParams);
        }
    }

    public void editMagnifierSizeMode(boolean enable) {
        setEditMagnifierSizeMode(enable);
        updateSelectedButton(MagnificationSize.NONE);