Fix two intro strings for Magnification page during Suw
- Keep the SuW intro and hide the setting intro Bug: 220025399 Test: Manual testing Change-Id: Ie4e9eace8dbd638bd141c14a22603644d93d458a
This commit is contained in:
@@ -78,6 +78,7 @@ import java.util.Locale;
|
|||||||
public abstract class ToggleFeaturePreferenceFragment extends SettingsPreferenceFragment
|
public abstract class ToggleFeaturePreferenceFragment extends SettingsPreferenceFragment
|
||||||
implements ShortcutPreference.OnClickCallback, OnMainSwitchChangeListener {
|
implements ShortcutPreference.OnClickCallback, OnMainSwitchChangeListener {
|
||||||
|
|
||||||
|
protected TopIntroPreference mTopIntroPreference;
|
||||||
protected SettingsMainSwitchPreference mToggleServiceSwitchPreference;
|
protected SettingsMainSwitchPreference mToggleServiceSwitchPreference;
|
||||||
protected ShortcutPreference mShortcutPreference;
|
protected ShortcutPreference mShortcutPreference;
|
||||||
protected Preference mSettingsPreference;
|
protected Preference mSettingsPreference;
|
||||||
@@ -476,10 +477,10 @@ public abstract class ToggleFeaturePreferenceFragment extends SettingsPreference
|
|||||||
if (TextUtils.isEmpty(mTopIntroTitle)) {
|
if (TextUtils.isEmpty(mTopIntroTitle)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final TopIntroPreference topIntroPreference = new TopIntroPreference(getPrefContext());
|
mTopIntroPreference = new TopIntroPreference(getPrefContext());
|
||||||
topIntroPreference.setKey(KEY_TOP_INTRO_PREFERENCE);
|
mTopIntroPreference.setKey(KEY_TOP_INTRO_PREFERENCE);
|
||||||
topIntroPreference.setTitle(mTopIntroTitle);
|
mTopIntroPreference.setTitle(mTopIntroTitle);
|
||||||
getPreferenceScreen().addPreference(topIntroPreference);
|
getPreferenceScreen().addPreference(mTopIntroPreference);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initToggleServiceSwitchPreference() {
|
private void initToggleServiceSwitchPreference() {
|
||||||
|
@@ -40,7 +40,7 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
|
|||||||
final String title = getContext().getString(
|
final String title = getContext().getString(
|
||||||
R.string.accessibility_screen_magnification_title);
|
R.string.accessibility_screen_magnification_title);
|
||||||
final String description = getContext().getString(
|
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);
|
final Drawable icon = getContext().getDrawable(R.drawable.ic_accessibility_visibility);
|
||||||
AccessibilitySetupWizardUtils.updateGlifPreferenceLayout(getContext(), layout, title,
|
AccessibilitySetupWizardUtils.updateGlifPreferenceLayout(getContext(), layout, title,
|
||||||
description, icon);
|
description, icon);
|
||||||
@@ -51,6 +51,8 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
|
|||||||
* Hide the magnification preference settings in the SuW's vision settings.
|
* Hide the magnification preference settings in the SuW's vision settings.
|
||||||
*/
|
*/
|
||||||
private void hidePreferenceSettingComponents() {
|
private void hidePreferenceSettingComponents() {
|
||||||
|
// Intro
|
||||||
|
mTopIntroPreference.setVisible(false);
|
||||||
// Setting of magnification type
|
// Setting of magnification type
|
||||||
mSettingsPreference.setVisible(false);
|
mSettingsPreference.setVisible(false);
|
||||||
// Setting of following typing
|
// Setting of following typing
|
||||||
|
@@ -46,6 +46,9 @@ public class ToggleScreenReaderPreferenceFragmentForSetupWizard
|
|||||||
description, icon);
|
description, icon);
|
||||||
|
|
||||||
mToggleSwitchWasInitiallyChecked = mToggleServiceSwitchPreference.isChecked();
|
mToggleSwitchWasInitiallyChecked = mToggleServiceSwitchPreference.isChecked();
|
||||||
|
if (mTopIntroPreference != null) {
|
||||||
|
mTopIntroPreference.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -46,6 +46,9 @@ public class ToggleSelectToSpeakPreferenceFragmentForSetupWizard
|
|||||||
description, icon);
|
description, icon);
|
||||||
|
|
||||||
mToggleSwitchWasInitiallyChecked = mToggleServiceSwitchPreference.isChecked();
|
mToggleSwitchWasInitiallyChecked = mToggleServiceSwitchPreference.isChecked();
|
||||||
|
if (mTopIntroPreference != null) {
|
||||||
|
mTopIntroPreference.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user