Merge "Update learn more string of FooterPrefernce" into tm-dev am: 24654a3d61 am: eaa0a1cf5c am: 21ddf79998 am: b9a06a9f34

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

Change-Id: I74b97b4b7d7a009af0dd20fe9f1a24717fffd3f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Edgar Wang
2022-05-21 00:28:03 +00:00
committed by Automerger Merge Worker
15 changed files with 29 additions and 29 deletions

View File

@@ -33,7 +33,7 @@ public class AccessibilityButtonFooterPreferenceController extends
}
@Override
protected String getLearnMoreContentDescription() {
protected String getLearnMoreText() {
return mContext.getString(
R.string.accessibility_button_gesture_footer_learn_more_content_description);
}

View File

@@ -31,7 +31,7 @@ public class AccessibilityControlTimeoutFooterPreferenceController extends
}
@Override
protected String getLearnMoreContentDescription() {
protected String getLearnMoreText() {
return mContext.getString(
R.string.accessibility_control_timeout_footer_learn_more_content_description);
}

View File

@@ -31,7 +31,7 @@ import com.android.settingslib.HelpUtils;
public class AccessibilityFooterPreferenceController extends BasePreferenceController {
private int mHelpResource;
private String mLearnMoreContentDescription;
private String mLearnMoreText;
private String mIntroductionTitle;
public AccessibilityFooterPreferenceController(Context context, String key) {
@@ -56,9 +56,9 @@ public class AccessibilityFooterPreferenceController extends BasePreferenceContr
* Setups a help item in the {@link AccessibilityFooterPreference} with specific content
* description.
*/
public void setupHelpLink(int helpResource, String learnMoreContentDescription) {
public void setupHelpLink(int helpResource, String learnMoreText) {
mHelpResource = helpResource;
mLearnMoreContentDescription = learnMoreContentDescription;
mLearnMoreText = learnMoreText;
}
/**
@@ -73,12 +73,12 @@ public class AccessibilityFooterPreferenceController extends BasePreferenceContr
/**
* Overrides this if showing a help item in the {@link AccessibilityFooterPreference} with
* specific content description.
* specific learn more title.
*
* @return the content description for the help url
* @return learn more title for the help url
*/
protected String getLearnMoreContentDescription() {
return mLearnMoreContentDescription;
protected String getLearnMoreText() {
return mLearnMoreText;
}
/**
@@ -117,7 +117,7 @@ public class AccessibilityFooterPreferenceController extends BasePreferenceContr
footerPreference.setLearnMoreAction(view -> {
view.startActivityForResult(helpIntent, 0);
});
footerPreference.setLearnMoreContentDescription(getLearnMoreContentDescription());
footerPreference.setLearnMoreText(getLearnMoreText());
footerPreference.setLinkEnabled(true);
} else {
footerPreference.setLinkEnabled(false);

View File

@@ -30,7 +30,7 @@ public class CaptionFooterPreferenceController extends AccessibilityFooterPrefer
}
@Override
protected String getLearnMoreContentDescription() {
protected String getLearnMoreText() {
return mContext.getString(
R.string.accessibility_captioning_footer_learn_more_content_description);
}

View File

@@ -31,7 +31,7 @@ public class ToggleAutoclickFooterPreferenceController extends
}
@Override
protected String getLearnMoreContentDescription() {
protected String getLearnMoreText() {
return mContext.getString(
R.string.accessibility_autoclick_footer_learn_more_content_description);
}

View File

@@ -114,10 +114,10 @@ public class ToggleColorInversionPreferenceFragment extends ToggleFeaturePrefere
private void updateFooterPreference() {
final String title = getPrefContext().getString(
R.string.accessibility_color_inversion_about_title);
final String learnMoreContentDescription = getPrefContext().getString(
final String learnMoreText = getPrefContext().getString(
R.string.accessibility_color_inversion_footer_learn_more_content_description);
mFooterPreferenceController.setIntroductionTitle(title);
mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreContentDescription);
mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreText);
mFooterPreferenceController.displayPreference(getPreferenceScreen());
}

View File

@@ -106,10 +106,10 @@ public final class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePrefe
private void updateFooterPreference() {
final String title = getPrefContext()
.getString(R.string.accessibility_daltonizer_about_title);
final String learnMoreContentDescription = getPrefContext()
final String learnMoreText = getPrefContext()
.getString(R.string.accessibility_daltonizer_footer_learn_more_content_description);
mFooterPreferenceController.setIntroductionTitle(title);
mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreContentDescription);
mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreText);
mFooterPreferenceController.displayPreference(getPreferenceScreen());
}

View File

@@ -109,10 +109,10 @@ public class ToggleScreenMagnificationPreferenceFragment extends
private void updateFooterPreference() {
final String title = getPrefContext().getString(
R.string.accessibility_screen_magnification_about_title);
final String learnMoreContentDescription = getPrefContext().getString(
final String learnMoreText = getPrefContext().getString(
R.string.accessibility_screen_magnification_footer_learn_more_content_description);
mFooterPreferenceController.setIntroductionTitle(title);
mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreContentDescription);
mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreText);
mFooterPreferenceController.displayPreference(getPreferenceScreen());
}