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

Commit 29b078da authored by Menghan Li's avatar Menghan Li Committed by Automerger Merge Worker
Browse files

Merge "Fix two intro strings for Magnification page during Suw" into tm-dev am: 100a1f99

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16932277

Change-Id: Ia46166b3f481ad997e934bea83ab18520ff6aefa
parents af36a280 100a1f99
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ import java.util.Locale;
public abstract class ToggleFeaturePreferenceFragment extends SettingsPreferenceFragment
        implements ShortcutPreference.OnClickCallback, OnMainSwitchChangeListener {

    protected TopIntroPreference mTopIntroPreference;
    protected SettingsMainSwitchPreference mToggleServiceSwitchPreference;
    protected ShortcutPreference mShortcutPreference;
    protected Preference mSettingsPreference;
@@ -483,10 +484,10 @@ public abstract class ToggleFeaturePreferenceFragment extends SettingsPreference
        if (TextUtils.isEmpty(mTopIntroTitle)) {
            return;
        }
        final TopIntroPreference topIntroPreference = new TopIntroPreference(getPrefContext());
        topIntroPreference.setKey(KEY_TOP_INTRO_PREFERENCE);
        topIntroPreference.setTitle(mTopIntroTitle);
        getPreferenceScreen().addPreference(topIntroPreference);
        mTopIntroPreference = new TopIntroPreference(getPrefContext());
        mTopIntroPreference.setKey(KEY_TOP_INTRO_PREFERENCE);
        mTopIntroPreference.setTitle(mTopIntroTitle);
        getPreferenceScreen().addPreference(mTopIntroPreference);
    }

    private void initToggleServiceSwitchPreference() {
+3 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
        final String title = getContext().getString(
                R.string.accessibility_screen_magnification_title);
        final String description = getContext().getString(
                R.string.accessibility_preference_magnification_summary);
                R.string.accessibility_screen_magnification_intro_text);
        final Drawable icon = getContext().getDrawable(R.drawable.ic_accessibility_visibility);
        AccessibilitySetupWizardUtils.updateGlifPreferenceLayout(getContext(), layout, title,
                description, icon);
@@ -51,6 +51,8 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
     * Hide the magnification preference settings in the SuW's vision settings.
     */
    private void hidePreferenceSettingComponents() {
        // Intro
        mTopIntroPreference.setVisible(false);
        // Setting of magnification type
        mSettingsPreference.setVisible(false);
        // Setting of following typing
+3 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ public class ToggleScreenReaderPreferenceFragmentForSetupWizard
                description, icon);

        mToggleSwitchWasInitiallyChecked = mToggleServiceSwitchPreference.isChecked();
        if (mTopIntroPreference != null) {
            mTopIntroPreference.setVisible(false);
        }
    }

    @Override
+3 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ public class ToggleSelectToSpeakPreferenceFragmentForSetupWizard
                description, icon);

        mToggleSwitchWasInitiallyChecked = mToggleServiceSwitchPreference.isChecked();
        if (mTopIntroPreference != null) {
            mTopIntroPreference.setVisible(false);
        }
    }

    @Override